X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=thirdparty%2Fsnappy%2Fformat_description.txt;h=20db66c1f26b3f1850d7105344bc43216cbda7fb;hb=7a9fb5103e052150232b64cb5d99374cda3f1234;hp=943bfc212f8d9b53b58c7665fa715727d9cc2740;hpb=07348d58030f889a4ec11bfcef9a32628e55afa4;p=apitrace diff --git a/thirdparty/snappy/format_description.txt b/thirdparty/snappy/format_description.txt index 943bfc2..20db66c 100644 --- a/thirdparty/snappy/format_description.txt +++ b/thirdparty/snappy/format_description.txt @@ -1,5 +1,5 @@ Snappy compressed format description -Last revised: 2011-05-16 +Last revised: 2011-10-05 This is not a formal specification, but should suffice to explain most @@ -21,8 +21,8 @@ The stream starts with the uncompressed length (up to a maximum of 2^32 - 1), stored as a little-endian varint. Varints consist of a series of bytes, where the lower 7 bits are data and the upper bit is set iff there are more bytes to be read. In other words, an uncompressed length of 64 would -be stored as 0x40, and an uncompressed length of 2097151 (0x1FFFFF) -would be stored as 0xFF 0xFF 0x7F. +be stored as 0x40, and an uncompressed length of 2097150 (0x1FFFFE) +would be stored as 0xFE 0xFF 0x7F. 2. The compressed stream itself @@ -38,7 +38,7 @@ follow: 00: Literal 01: Copy with 1-byte offset 10: Copy with 2-byte offset - 11: Copy with 3-byte offset + 11: Copy with 4-byte offset The interpretation of the upper six bits are element-dependent. @@ -52,7 +52,7 @@ of the literal: - For literals up to and including 60 bytes in length, the upper six bits of the tag byte contain (len-1). The literal follows immediately thereafter in the bytestream. - - For longer literals, the length is stored after the tag byte, + - For longer literals, the (len-1) value is stored after the tag byte, little-endian. The upper six bits of the tag byte describe how many bytes are used for the length; 60, 61, 62 or 63 for 1-4 bytes, respectively. The literal itself follows after the @@ -103,7 +103,7 @@ six bits ([2..7]) of the tag byte. The offset is stored as a little-endian 16-bit integer in the two bytes following the tag byte. -2.2.3. Copy with 4-byte offsets (11) +2.2.3. Copy with 4-byte offset (11) These are like the copies with 2-byte offsets (see previous subsection), except that the offset is stored as a 32-bit integer instead of a