summaryrefslogtreecommitdiffstats
path: root/programs/lz4io.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-08-12 00:58:46 (GMT)
committerYann Collet <cyan@fb.com>2017-08-12 00:58:46 (GMT)
commit930a6921103c3ae4e62c99f86fd5329ef957900f (patch)
treef94f33e901d7eb56699d44bdfb91a08157aa8b50 /programs/lz4io.c
parent77f99d2922a82bd3187dd7086a8b9dee06bbaed6 (diff)
downloadlz4-930a6921103c3ae4e62c99f86fd5329ef957900f.zip
lz4-930a6921103c3ae4e62c99f86fd5329ef957900f.tar.gz
lz4-930a6921103c3ae4e62c99f86fd5329ef957900f.tar.bz2
cli : restored command -BX to enable block checksum (#322)
Diffstat (limited to 'programs/lz4io.c')
-rw-r--r--programs/lz4io.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 1e6b437..06741b4 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -173,17 +173,17 @@ int LZ4IO_setBlockMode(LZ4IO_blockMode_t blockMode)
return g_blockIndependence;
}
-/* Default setting : no checksum */
-int LZ4IO_setBlockChecksumMode(int xxhash)
+/* Default setting : no block checksum */
+int LZ4IO_setBlockChecksumMode(int enable)
{
- g_blockChecksum = (xxhash != 0);
+ g_blockChecksum = (enable != 0);
return g_blockChecksum;
}
/* Default setting : checksum enabled */
-int LZ4IO_setStreamChecksumMode(int xxhash)
+int LZ4IO_setStreamChecksumMode(int enable)
{
- g_streamChecksum = (xxhash != 0);
+ g_streamChecksum = (enable != 0);
return g_streamChecksum;
}
@@ -455,6 +455,7 @@ static int LZ4IO_compressFilename_extRess(cRess_t ress, const char* srcFileName,
prefs.compressionLevel = compressionLevel;
prefs.frameInfo.blockMode = (LZ4F_blockMode_t)g_blockIndependence;
prefs.frameInfo.blockSizeID = (LZ4F_blockSizeID_t)g_blockSizeId;
+ prefs.frameInfo.blockChecksumFlag = (LZ4F_blockChecksum_t)g_blockChecksum;
prefs.frameInfo.contentChecksumFlag = (LZ4F_contentChecksum_t)g_streamChecksum;
if (g_contentSizeFlag) {
U64 const fileSize = UTIL_getFileSize(srcFileName);