diff options
author | Yann Collet <cyan@fb.com> | 2016-11-09 23:04:55 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2016-11-09 23:04:55 (GMT) |
commit | 1b95d60c66bfc80b77066f929263cf3aac412434 (patch) | |
tree | af18582ad19d8aff00e00dc090b7f12d60d7aff6 /programs/lz4io.c | |
parent | acc48a3f85e5c97a102999544248ee7e51cc419b (diff) | |
download | lz4-1b95d60c66bfc80b77066f929263cf3aac412434.zip lz4-1b95d60c66bfc80b77066f929263cf3aac412434.tar.gz lz4-1b95d60c66bfc80b77066f929263cf3aac412434.tar.bz2 |
fixed synthetic benchmark mode
slightly optimized test mode
Diffstat (limited to 'programs/lz4io.c')
-rw-r--r-- | programs/lz4io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c index 73957e1..c0eb667 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -805,7 +805,7 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE /* Write Block */ if (decodedBytes) { - storedSkips = LZ4IO_fwriteSparse(dstFile, ress.dstBuffer, decodedBytes, storedSkips); + if (!g_testMode) storedSkips = LZ4IO_fwriteSparse(dstFile, ress.dstBuffer, decodedBytes, storedSkips); filesize += decodedBytes; DISPLAYUPDATE(2, "\rDecompressed : %u MB ", (unsigned)(filesize>>20)); } @@ -816,7 +816,7 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE /* can be out because readSize == 0, which could be an fread() error */ if (ferror(srcFile)) EXM_THROW(67, "Read error"); - LZ4IO_fwriteSparseEnd(dstFile, storedSkips); + if (!g_testMode) LZ4IO_fwriteSparseEnd(dstFile, storedSkips); if (nextToLoad!=0) EXM_THROW(68, "Unfinished stream"); return filesize; |