fixed doc on cLevel default, reported by Oliver Lange

dev
Yann Collet 2016-07-24 01:21:53 +02:00
parent f8e7b5363f
commit 10b9c13d07
4 changed files with 14 additions and 15 deletions

View 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;

View 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

View 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");

View 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.
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.
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.
##### FSE decoding : from normalized distribution to decoding tables
The distribution of normalized probabilities is enough