Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Making all your integers positive with zigzag encoding. Parent comment
postcard's zigzag encoding matches phoboslab's psuedocode.
Edit, not totally sure, but this wiki page rings a bell, and is probably where I got my impl from: https://en.wikipedia.org/wiki/Variable-length_quantity#Zigza...
Edit 2: I also explain why I do this (it compresses better) in my wire format specification: https://postcard.jamesmunns.com/wire-format.html#signed-inte...
There are no comments on this comment yet.
postcard's zigzag encoding matches phoboslab's psuedocode.
Edit, not totally sure, but this wiki page rings a bell, and is probably where I got my impl from: https://en.wikipedia.org/wiki/Variable-length_quantity#Zigza...
Edit 2: I also explain why I do this (it compresses better) in my wire format specification: https://postcard.jamesmunns.com/wire-format.html#signed-inte...