The worry isn't size of value but reliably sized and laid out serialized structure.

It looked like it's just snagging the structure memory and splashing it on disk and back, which should be OK up till compiler changes alter memory layout (#pragma packed can help here) or the file gets synced to a device with different integer width or endianness.

The fix would be to de/serialize intentionally to a byte buffer. But not sure how that would interact with the JavaScript preferences system's assumptions.