diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2019-05-16 22:56:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-16 22:56:42 (GMT) |
commit | a7151324af18216119bf3489f159bef8b74323f2 (patch) | |
tree | 4cb90d19be21da6c2b7d60d35633e157c2c7d8e8 /lib | |
parent | df2451479cc70e73e96466f0bc341bdac722bbe9 (diff) | |
parent | 81081f9b2d6e114b06f7a3eecc8e6a20bb88e035 (diff) | |
download | lz4-a7151324af18216119bf3489f159bef8b74323f2.zip lz4-a7151324af18216119bf3489f159bef8b74323f2.tar.gz lz4-a7151324af18216119bf3489f159bef8b74323f2.tar.bz2 |
Merge pull request #708 from gabrielstedman/list
Add multiframe report to --list command
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4frame.c | 4 | ||||
-rw-r--r-- | lib/lz4frame.h | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c index f131d9a..95b8b8e 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -213,8 +213,8 @@ static void LZ4F_writeLE64 (void* dst, U64 value64) static const size_t minFHSize = LZ4F_HEADER_SIZE_MIN; /* 7 */ static const size_t maxFHSize = LZ4F_HEADER_SIZE_MAX; /* 19 */ -static const size_t BHSize = 4; /* block header : size, and compress flag */ -static const size_t BFSize = 4; /* block footer : checksum (optional) */ +static const size_t BHSize = LZ4F_BLOCK_HEADER_SIZE; /* block header : size, and compress flag */ +static const size_t BFSize = LZ4F_BLOCK_CHECKSUM_SIZE; /* block footer : checksum (optional) */ /*-************************************ diff --git a/lib/lz4frame.h b/lib/lz4frame.h index 742c252..391e484 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -253,6 +253,15 @@ LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx); #define LZ4F_HEADER_SIZE_MIN 7 /* LZ4 Frame header size can vary, depending on selected paramaters */ #define LZ4F_HEADER_SIZE_MAX 19 +/* Size in bytes of a block header in little-endian format. Highest bit indicates if block data is uncompressed */ +#define LZ4F_BLOCK_HEADER_SIZE 4 + +/* Size in bytes of a block checksum footer in little-endian format. */ +#define LZ4F_BLOCK_CHECKSUM_SIZE 4 + +/* Size in bytes of the content checksum. */ +#define LZ4F_CONTENT_CHECKSUM_SIZE 4 + /*! LZ4F_compressBegin() : * will write the frame header into dstBuffer. * dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes. |