I'm working with an ESP32, so I'm not sure if this forum still pertains, but if so:
I need to store some information between power cycles. Only about 32 bytes made up of integer variables.
Searches have led me to both EEPROM.write and to Preferences.putbytes (or .write). I believe that .write only works with individual bytes (0-255) of memory and I have to manage it, which is OK. I believe that .putbytes/.write works with a block of memory that I can map to a structure, which is also OK.
Seems like EEPROM is simpler since .putbytes/.write involved memory copies to/from a buffer.
Is there a reason to use one over the other?
Also, I've seen .putbytes in some examples, and .write in others - is there a difference.
And while I'm at it, I understand that re-writing variables to flash memory can be done a limited amount of times. But are we talking dozens, hundreds or thousands of times?
You will have to keep the power up until you finish writing. How often you are going to do this I do not know but it appears the memory write cycle life will not be a problem. I would suggest using some FRAM, it has unlimited writes. Do this with a check sum and save several so you can check them. Update as soon as you get each byte of data, there is no write limit. In the old days we use to do this with CMOS battery backed RAM. You have a lot of options.
IraSch:
And while I'm at it, I understand that re-writing variables to flash memory can be done a limited amount of times. But are we talking dozens, hundreds or thousands of times?
It depends on the actual Flash memory that has been fitted to your ESP32 module, could typicqally be anywhere between 10,000 to 100,000 write endurance.
I2C FRAM is the most straight forward solution and has a write endurance of between 1,000,000,000,000 and 100,000,000,000,000 times (i.e. a lot).