]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed doc on cLevel default, reported by Oliver Lange
authorYann Collet <yann.collet.73@gmail.com>
Sat, 23 Jul 2016 23:21:53 +0000 (01:21 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Sat, 23 Jul 2016 23:21:53 +0000 (01:21 +0200)
lib/decompress/zstd_decompress.c
programs/zstd.1
programs/zstdcli.c
zstd_compression_format.md

index 71dbc92a2007090753513fcdb9d1c6846eabec00..6053d32502bae989c66832adf6f2db80906dba98 100644 (file)
@@ -770,7 +770,7 @@ size_t ZSTD_execSequence(BYTE* op,
     BYTE* const oLitEnd = op + sequence.litLength;
     size_t const sequenceLength = sequence.litLength + sequence.matchLength;
     BYTE* const oMatchEnd = op + sequenceLength;   /* risk : address space overflow (32-bits) */
-    BYTE* const oend_w = oend-WILDCOPY_OVERLENGTH;
+    BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH;
     const BYTE* const iLitEnd = *litPtr + sequence.litLength;
     const BYTE* match = oLitEnd - sequence.offset;
 
index 7201f76c357fac998765dbf1a45afd720dc9304e..9b6be9349631c6a17820ae83e2871095128513f7 100644 (file)
@@ -43,7 +43,7 @@ It also features a very fast decoder, with speed > 500 MB/s per core.
 .SH OPTIONS
 .TP
 .B \-#
- # compression level [1-22] (default:1)
+ # compression level [1-22] (default:3)
 .TP
 .BR \-d ", " --decompress
  decompression
index d4f4c21ea4ad4e51fc5b633fb5b7724bdf6d4284..344d3c88ed27167fde4dc99d121efa26620bb666 100644 (file)
@@ -115,7 +115,7 @@ static int usage(const char* programName)
     DISPLAY( "          with no FILE, or when FILE is - , read standard input\n");
     DISPLAY( "Arguments :\n");
 #ifndef ZSTD_NOCOMPRESS
-    DISPLAY( " -#     : # compression level (1-%u, default:1) \n", ZSTD_maxCLevel());
+    DISPLAY( " -#     : # compression level (1-%u, default:%u) \n", ZSTD_maxCLevel(), ZSTDCLI_CLEVEL_DEFAULT);
 #endif
 #ifndef ZSTD_NODECOMPRESS
     DISPLAY( " -d     : decompression \n");
index 8f72b1e635e32f25b206861b7753ad1226c1af21..1aa4268ba2cac113b389001bffe025ef03ac23a7 100644 (file)
@@ -749,17 +749,17 @@ Let's call its first byte `byte0`.
 - `if (byte0 < 255)` : `nbSeqs = ((byte0-128) << 8) + byte1;` . Uses 2 bytes.
 - `if (byte0 == 255)`: `nbSeqs = byte1 + (byte2<<8) + 0x7F00;` . Uses 3 bytes.
 
-__Symbol compression modes__
+__Symbol encoding modes__
 
 This is a single byte, defining the compression mode of each symbol type.
 
 |  BitNb  |   7-6  |   5-4  |   3-2  |    1-0   |
 | ------- | ------ | ------ | ------ | -------- |
-|FieldName| LLtype | OFType | MLType | Reserved |
+|FieldName| LLType | OFType | MLType | Reserved |
 
 The last field, `Reserved`, must be all-zeroes.
 
-`LLtype`, `OFType` and `MLType` define the compression mode of
+`LLType`, `OFType` and `MLType` define the compression mode of
 Literal Lengths, Offsets and Match Lengths respectively.
 
 They follow the same enumeration :
@@ -898,16 +898,16 @@ short offsetCodes_defaultDistribution[53] =
 #### Distribution tables
 
 Following the header, up to 3 distribution tables can be described.
-They are, in order :
+When present, they are in this order :
 - Literal lengthes
 - Offsets
 - Match Lengthes
 
-The content to decode depends on their respective compression mode :
-- Repeat mode : no content. Re-use distribution from previous compressed block.
+The content to decode depends on their respective encoding mode :
 - Predef : no content. Use pre-defined distribution table.
 - RLE : 1 byte. This is the only code to use across the whole compressed block.
 - FSE : A distribution table is present.
+- Repeat mode : no content. Re-use distribution from previous compressed block.
 
 ##### FSE distribution table : condensed format
 
@@ -971,15 +971,14 @@ If it is a 3, another 2-bits repeat flag follows, and so on.
 
 When last symbol reaches cumulated total of `1 << AccuracyLog`,
 decoding is complete.
+If the last symbol makes cumulated total go above `1 << AccuracyLog`,
+distribution is considered corrupted.
+
 Then the decoder can tell how many bytes were used in this process,
 and how many symbols are present.
-
 The bitstream consumes a round number of bytes.
 Any remaining bit within the last byte is just unused.
 
-If the last symbol makes cumulated total go above `1 << AccuracyLog`,
-distribution is considered corrupted.
-
 ##### FSE decoding : from normalized distribution to decoding tables
 
 The distribution of normalized probabilities is enough