You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Separate JSON and hash file operations are inevitably not atomic #515
#503 now contains atomic file operations, but it is not possible to store two files in an atomic manner.
Proposal: store checksum at the beginning of the file, followed by JSON data.
Maybe there's another solution to that.
[ header : 4 | version : 4 | checksum : 4 | data : n ]
header: file header containing a magic number, I propose SKVS == 0x534B5653. File format detection only.
Should be a constant, always.
version: representation version.
Should be changed on data representation or file format change.
It is not a version of consumers data!
checksum: checksum of data that follows. Size might be increased in the future, then a bump to a version should occur.
data: data stored continuously.
header and version layout should always be the same.
The rest can be modified with a version bump and either ensured compatibility or reported version mismatch.
E.g., version 2 might introduce CRC64, which makes checksum part 8 bytes long. Version 3 might introduce a new flags section placed before checksum.
I'm not certain if additional data length field should be added to avoid unrestricted read.
Activity
arkjedrz commentedon Oct 21, 2026
File format proposal
I propose the following, sizes are in bytes.
[ header : 4 | version : 4 | checksum : 4 | data : n ]
header: file header containing a magic number, I proposeSKVS==0x534B5653. File format detection only.version: representation version.checksum: checksum of data that follows. Size might be increased in the future, then a bump to a version should occur.data: data stored continuously.headerandversionlayout should always be the same.The rest can be modified with a version bump and either ensured compatibility or reported version mismatch.
E.g., version 2 might introduce CRC64, which makes
checksumpart 8 bytes long. Version 3 might introduce a newflagssection placed beforechecksum.I'm not certain if additional data length field should be added to avoid unrestricted read.
arkjedrz commentedon Oct 22, 2026
Discussed and agreed 22.10.2026