fixed doc on cLevel default, reported by Oliver Lange
This commit is contained in:
parent
f8e7b5363f
commit
10b9c13d07
@ -770,7 +770,7 @@ size_t ZSTD_execSequence(BYTE* op,
|
|||||||
BYTE* const oLitEnd = op + sequence.litLength;
|
BYTE* const oLitEnd = op + sequence.litLength;
|
||||||
size_t const sequenceLength = sequence.litLength + sequence.matchLength;
|
size_t const sequenceLength = sequence.litLength + sequence.matchLength;
|
||||||
BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */
|
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* const iLitEnd = *litPtr + sequence.litLength;
|
||||||
const BYTE* match = oLitEnd - sequence.offset;
|
const BYTE* match = oLitEnd - sequence.offset;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ It also features a very fast decoder, with speed > 500 MB/s per core.
|
|||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B \-#
|
.B \-#
|
||||||
# compression level [1-22] (default:1)
|
# compression level [1-22] (default:3)
|
||||||
.TP
|
.TP
|
||||||
.BR \-d ", " --decompress
|
.BR \-d ", " --decompress
|
||||||
decompression
|
decompression
|
||||||
|
@ -115,7 +115,7 @@ static int usage(const char* programName)
|
|||||||
DISPLAY( " with no FILE, or when FILE is - , read standard input\n");
|
DISPLAY( " with no FILE, or when FILE is - , read standard input\n");
|
||||||
DISPLAY( "Arguments :\n");
|
DISPLAY( "Arguments :\n");
|
||||||
#ifndef ZSTD_NOCOMPRESS
|
#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
|
#endif
|
||||||
#ifndef ZSTD_NODECOMPRESS
|
#ifndef ZSTD_NODECOMPRESS
|
||||||
DISPLAY( " -d : decompression \n");
|
DISPLAY( " -d : decompression \n");
|
||||||
|
@ -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 = ((byte0-128) << 8) + byte1;` . Uses 2 bytes.
|
||||||
- `if (byte0 == 255)`: `nbSeqs = byte1 + (byte2<<8) + 0x7F00;` . Uses 3 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.
|
This is a single byte, defining the compression mode of each symbol type.
|
||||||
|
|
||||||
| BitNb | 7-6 | 5-4 | 3-2 | 1-0 |
|
| 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.
|
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.
|
Literal Lengths, Offsets and Match Lengths respectively.
|
||||||
|
|
||||||
They follow the same enumeration :
|
They follow the same enumeration :
|
||||||
@ -898,16 +898,16 @@ short offsetCodes_defaultDistribution[53] =
|
|||||||
#### Distribution tables
|
#### Distribution tables
|
||||||
|
|
||||||
Following the header, up to 3 distribution tables can be described.
|
Following the header, up to 3 distribution tables can be described.
|
||||||
They are, in order :
|
When present, they are in this order :
|
||||||
- Literal lengthes
|
- Literal lengthes
|
||||||
- Offsets
|
- Offsets
|
||||||
- Match Lengthes
|
- Match Lengthes
|
||||||
|
|
||||||
The content to decode depends on their respective compression mode :
|
The content to decode depends on their respective encoding mode :
|
||||||
- Repeat mode : no content. Re-use distribution from previous compressed block.
|
|
||||||
- Predef : no content. Use pre-defined distribution table.
|
- Predef : no content. Use pre-defined distribution table.
|
||||||
- RLE : 1 byte. This is the only code to use across the whole compressed block.
|
- RLE : 1 byte. This is the only code to use across the whole compressed block.
|
||||||
- FSE : A distribution table is present.
|
- FSE : A distribution table is present.
|
||||||
|
- Repeat mode : no content. Re-use distribution from previous compressed block.
|
||||||
|
|
||||||
##### FSE distribution table : condensed format
|
##### 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`,
|
When last symbol reaches cumulated total of `1 << AccuracyLog`,
|
||||||
decoding is complete.
|
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`,
|
If the last symbol makes cumulated total go above `1 << AccuracyLog`,
|
||||||
distribution is considered corrupted.
|
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
|
##### FSE decoding : from normalized distribution to decoding tables
|
||||||
|
|
||||||
The distribution of normalized probabilities is enough
|
The distribution of normalized probabilities is enough
|
||||||
|
Loading…
x
Reference in New Issue
Block a user