Serialization wrapper for Longs which burns one bit per byte indicating whether any more bytes follow.
Can utilize less serialized space than naively writing 8-byte Longs in datasets where absolute values tend to be
less than 248 more often than they are ≥ 255.
Long's absolute values correspond to the following number of serialized bytes:
The first byte, in addition to its most significant bit indicating whether any more bites follow, uses its
second-most-significant bit to represent the sign of the Long.
Serialization wrapper for Longs which burns one bit per byte indicating whether any more bytes follow.
Can utilize less serialized space than naively writing 8-byte Longs in datasets where absolute values tend to be less than 248 more often than they are ≥ 255.
Long's absolute values correspond to the following number of serialized bytes:
[ 0, 26): 1 byte [ 26, 213): 2 bytes [213, 220): 3 bytes [220, 227): 4 bytes [227, 234): 5 bytes [234, 241): 6 bytes [241, 248): 7 bytes [248, 255): 8 bytes [255, 2^63): 9 bytes
The first byte, in addition to its most significant bit indicating whether any more bites follow, uses its second-most-significant bit to represent the sign of the Long.