summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorgstedman <gabriel.stedman@zynstra.com>2019-05-10 15:54:05 (GMT)
committergabrielstedman <gabriel.stedman@zynstra.com>2019-05-15 20:13:19 (GMT)
commit98a86c8ef6ea3202f8cb52772144d0f744bd5c73 (patch)
treeddeb450b694f4aac94701708e88cfdbf34ae741e /lib
parent02914300185515097cdbebcd95c379508b5d3053 (diff)
downloadlz4-98a86c8ef6ea3202f8cb52772144d0f744bd5c73.zip
lz4-98a86c8ef6ea3202f8cb52772144d0f744bd5c73.tar.gz
lz4-98a86c8ef6ea3202f8cb52772144d0f744bd5c73.tar.bz2
Add multiframe report to --list command
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4frame.c4
-rw-r--r--lib/lz4frame.h9
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.