added : frame content checksum

This commit is contained in:
Yann Collet
2016-05-31 22:23:45 +02:00
parent e3f4e6cbda
commit f2a3b6e7b4
7 changed files with 91 additions and 66 deletions
+4 -2
View File
@@ -86,8 +86,9 @@ typedef struct {
} ZSTD_compressionParameters;
typedef struct {
U32 contentSizeFlag; /* 1: content size will be in frame header (if known). */
U32 noDictIDFlag; /* 1: no dict ID will be saved into frame header (if dictionary compression) */
U32 contentSizeFlag; /* 1: content size will be in frame header (if known). */
U32 checksumFlag; /* 1: will generate a 22-bits checksum at end of frame, to be used for error detection by decompressor */
U32 noDictIDFlag; /* 1: no dict ID will be saved into frame header (if dictionary compression) */
} ZSTD_frameParameters;
typedef struct {
@@ -196,6 +197,7 @@ typedef struct {
U64 frameContentSize;
U32 windowLog;
U32 dictID;
U32 checksumFlag;
} ZSTD_frameParams;
#define ZSTD_FRAMEHEADERSIZE_MAX 18 /* for static allocation */