3 ms·
Me, sowing: "Each record begins with a 4 octet BE value indicating the record length." Me, reaping: "Each record begins with a single byte indicating the recor
by morelisp 4y ago
Me, sowing: "Each record begins with a 4 octet BE value indicating the record length."
Me, reaping: "Each record begins with a single byte indicating the record format version. In version 0, this is followed by a 3 octet BE value indicating the record length."
- Groxx 4y agoif you're storing the raw binary rather than hex or base64: yeah. there are often no illegal values, so there's no way to safely extend it, unless you can differentiate on length. for those, you have to leave versioning room up-front. even 1 bit is enough, since a `1` can imply "following data describes the version", if a bit wastefully in the long run.
- nh23423fefe 4y agosow then reap
- morelisp 4y agoWell this fucking sucks. What the fuck.
- cdelsolar 4y agoWhat are you guys even talking about
- etc-hosts 4y agohttps://twitter.com/screaminbutcalm/status/1105577845642878976 https://twitter.com/screaminbutcalm/status/11055778456428789...
- nh23423fefe 4y agoi deserved it, i guess, lol
- deleted 4y ago[deleted]
- kazinator 4y agoThat's not applicable to Grox's example. The initial version uses only hexadecimal digits for the SHA256. If you had: "each record begins with an 8 character record length, in hexadecimal, giving 32 bits", you have no problems. The new version has a 'V' character in byte 0, which is rejected as invalid by the old implementation.
- morelisp 4y agoLove too put another branch in the decoder I need to run a billion times.