SQLite4
Check-in [eccdf70b22]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix typos in the VARINT documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: eccdf70b22ec3a255b9090e557ceb9f848509b83
User & Date: drh 2013-01-20 02:52:43
Context
2013-01-24
18:24
Fix a string type compile warning. check-in: 11b2bf1628 user: stephan tags: trunk
2013-01-20
02:52
Fix typos in the VARINT documentation. check-in: eccdf70b22 user: drh tags: trunk
02:38
Fix a typo on the key-encoding documentation. check-in: b1ae0ca8c3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to www/varint.wiki.

     1      1   <title>Variable-Length Integers</title>
     2      2   
     3      3   A variable length integer is an encoding of 64-bit unsigned integers
     4      4   into between 1 and 9 bytes.  The encoding has the following properties:
     5      5   
     6         -  1.  Smaller (and common) values use fewer bytes and take up less space
            6  +  1.  Smaller (and more common) values use fewer bytes and take up less space
     7      7         than larger (and less common) values.
     8      8   
     9      9     2.  The length of any varint can be determined by looking at just the
    10     10         first byte of the encoding.
    11     11   
    12     12     3.  Lexicographical and numeric ordering for varints are the same.  Hence
    13     13         if a group of varints are order lexicographically (that is to say, if
    14         -      they  are order by memcmp() with shorted varints coming first) then
           14  +      they  are order by memcmp() with shorter varints coming first) then
    15     15         those varints will also be in numeric order.  This property means
    16     16         that varints can be used as keys in the key/value backend storage
    17     17         and the records will occur in numerical order of the keys.
    18     18   
    19     19   The encoding is described by algorithms to decode (convert from
    20     20   varint to 8-byte unsigned integer) and to encode (convert from
    21     21   8-byte unsigned integer to varint).  Treat each byte of the encoding