github.com/alphazero/unum (go): package implements the 'unum' tagged value binary encoding of unsigned integers. Schme per John Gustafson, "Right-Sizing Precision"(presentation) , March 2013.  Gustafson's `unum` numeric value representation scheme is a tagged value encoding scheme supporting variable physical storage of numeric values. The idea is pretty straight forward: typically values used hardly reach the value type's maximum value and space is wasted. By tagging the physical image of the value with an indication of the size category (see below) we can use less bytes than the full type (e.g. uint64 at 8 bytes) would require.  Given that unlike Gustafson's we're not discussing hardware here, and we use byte buffers, this scheme is a good match for shuffling sequence of numbers in I/O.  This implementation (as of now) only supports unsigned integer values.  Note that the scheme is uniformly byte-aligned, not word-aligned.  The 2-bits of the tag determine the value-range and physical length of the image:
Keywords: encoding|variable-length