make room for reserved "information bit" in frame header
This commit is contained in:
@@ -5,8 +5,9 @@ New : Visual build scripts, by Christophe Chevalier
|
|||||||
New : Support for Sparse File-systems (do not use space for zero-filled sectors)
|
New : Support for Sparse File-systems (do not use space for zero-filled sectors)
|
||||||
New : Frame checksum support
|
New : Frame checksum support
|
||||||
New : Support pass-through mode (when using `-df`)
|
New : Support pass-through mode (when using `-df`)
|
||||||
New : API : dictionary files from custom content, by Giuseppe Ottaviano
|
API : more efficient Dictionary API : `ZSTD_compress_usingCDict()`, `ZSTD_decompress_usingDDict()`
|
||||||
New : API support for custom malloc/free functions
|
API : create dictionary files from custom content, by Giuseppe Ottaviano
|
||||||
|
API : support for custom malloc/free functions
|
||||||
New : controllable Dictionary ID
|
New : controllable Dictionary ID
|
||||||
New : Support for skippable frames
|
New : Support for skippable frames
|
||||||
|
|
||||||
|
|||||||
@@ -223,8 +223,10 @@ void ZSTD_copyDCtx(ZSTD_DCtx* dstDCtx, const ZSTD_DCtx* srcDCtx)
|
|||||||
// new
|
// new
|
||||||
1 byte - FrameHeaderDescription :
|
1 byte - FrameHeaderDescription :
|
||||||
bit 0-1 : dictID (0, 1, 2 or 4 bytes)
|
bit 0-1 : dictID (0, 1, 2 or 4 bytes)
|
||||||
bit 2-4 : reserved (must be zero)
|
bit 2 : checksumFlag
|
||||||
bit 5 : SkippedWindowLog (if 1, WindowLog byte is not present)
|
bit 3 : reserved (must be zero)
|
||||||
|
bit 4 : reserved (unused, can be any value)
|
||||||
|
bit 5 : Single Segment (if 1, WindowLog byte is not present)
|
||||||
bit 6-7 : FrameContentFieldSize (0, 2, 4, or 8)
|
bit 6-7 : FrameContentFieldSize (0, 2, 4, or 8)
|
||||||
if (SkippedWindowLog && !FrameContentFieldsize) FrameContentFieldsize=1;
|
if (SkippedWindowLog && !FrameContentFieldsize) FrameContentFieldsize=1;
|
||||||
|
|
||||||
@@ -365,7 +367,7 @@ size_t ZSTD_getFrameParams(ZSTD_frameParams* fparamsPtr, const void* src, size_t
|
|||||||
U32 windowSize = 0;
|
U32 windowSize = 0;
|
||||||
U32 dictID = 0;
|
U32 dictID = 0;
|
||||||
U64 frameContentSize = 0;
|
U64 frameContentSize = 0;
|
||||||
if ((fhdByte & 0x18) != 0) return ERROR(frameParameter_unsupported); /* reserved bits */
|
if ((fhdByte & 0x08) != 0) return ERROR(frameParameter_unsupported); /* reserved bits, which must be zero */
|
||||||
if (!directMode) {
|
if (!directMode) {
|
||||||
BYTE const wlByte = ip[pos++];
|
BYTE const wlByte = ip[pos++];
|
||||||
U32 const windowLog = (wlByte >> 3) + ZSTD_WINDOWLOG_ABSOLUTEMIN;
|
U32 const windowLog = (wlByte >> 3) + ZSTD_WINDOWLOG_ABSOLUTEMIN;
|
||||||
|
|||||||
Reference in New Issue
Block a user