github.com/alphazero/unum
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:
proxy.golang.org
v0.0.0-20190710215506-46031ad31aa2
over 6 years ago
1
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/alphazero/unum
spec |
| License | MIT |
| Namespace | github.com/alphazero |
| First Release | over 6 years ago |
| Last Synced | 10 days ago |
Repository
| Stars | 3 on GitHub |
| Forks | 1 on GitHub |