summaryrefslogtreecommitdiffstats
path: root/programs/lz4io.c
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2017-08-15 23:50:04 (GMT)
committerGitHub <noreply@github.com>2017-08-15 23:50:04 (GMT)
commitaf9d72b7f6809ec972787c446d464a8f9be443ba (patch)
treed8b9e795e00d2558945f0f6bc3aed2b239157353 /programs/lz4io.c
parent8593ba8831fb4698731c60391aa0ab89b32e9e19 (diff)
parent930a6921103c3ae4e62c99f86fd5329ef957900f (diff)
downloadlz4-af9d72b7f6809ec972787c446d464a8f9be443ba.zip
lz4-af9d72b7f6809ec972787c446d464a8f9be443ba.tar.gz
lz4-af9d72b7f6809ec972787c446d464a8f9be443ba.tar.bz2
Merge pull request #383 from lz4/blockChecksum
Block checksum
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);