Data

From Adam Colton
Revision as of 15:10, 18 September 2019 by Adamcolton (talk | contribs) (Created page with "Data; it's structure, formatting and storage. == Large Uint == We can treat any piece of data as a large unsigned int. The efficient encoding of a large unsigned int is to en...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Data; it's structure, formatting and storage.

Large Uint

We can treat any piece of data as a large unsigned int. The efficient encoding of a large unsigned int is to encode the length as a header:

 [1]*0[10]*

The number of 1's (L) indicates the data length. The length is ((1<<(L-1))+1, with an exception that 0 is 1. I think there's a better formula, but I haven't found it yet.