Open jbenet opened 9 years ago
Assuming you mean: https://developers.google.com/protocol-buffers/docs/encoding#varints
thanks for pointing that out. It looks like it might be better. It costs 1 bit per 7 bits in length versus my current idea that costs 1 byte per 1 byte of length.
I'm sold on this idea, and it makes things more efficent.
Why does the spec I referenced reverse the order of the 7-bit chunks? I don't see a benefit to that.
Assuming you mean: https://developers.google.com/protocol-buffers/docs/encoding#varints
there's many styles of varints, but yeah, that works.
Why does the spec I referenced reverse the order of the 7-bit chunks? I don't see a benefit to that.
not sure, convention maybe? https://en.wikipedia.org/wiki/Variable-length_quantity
(i usually do varints without reversing)
For the length?