summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
Diffstat (limited to 'programs')
-rw-r--r--programs/Makefile11
-rw-r--r--programs/lz4io.c3
2 files changed, 11 insertions, 3 deletions
diff --git a/programs/Makefile b/programs/Makefile
index 1798b8f..f015d27 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -168,8 +168,9 @@ test-lz4-sparse: lz4 datagen
ls -ls tmpOdd
@rm tmp*
@echo "\n Compatibility with Console :"
- ./lz4 COPYING | ./lz4 -d -c
- ./lz4 COPYING | ./lz4 -d | cat
+ echo "Hello World 1 !" | ./lz4 | ./lz4 -d -c
+ echo "Hello World 2 !" | ./lz4 | ./lz4 -d | cat
+ echo "Hello World 3 !" | ./lz4 --no-frame-crc | ./lz4 -d -c
test-lz4-contentSize: lz4 datagen
@echo "\n ---- test original size support ----"
@@ -214,6 +215,11 @@ test-lz4-basic: lz4 datagen
@echo "\n ---- test lz4 basic compression/decompression ----"
./datagen -g0 | ./lz4 -v | ./lz4 -t
./datagen -g16KB | ./lz4 -9 | ./lz4 -t
+ ./datagen -g20KB > tmpSrc
+ ./lz4 < tmpSrc | ./lz4 -d > tmpRes
+ diff -q tmpSrc tmpRes
+ ./lz4 --no-frame-crc < tmpSrc | ./lz4 -d > tmpRes
+ diff -q tmpSrc tmpRes
./datagen | ./lz4 | ./lz4 -t
./datagen -g6M -P99 | ./lz4 -9BD | ./lz4 -t
./datagen -g17M | ./lz4 -9v | ./lz4 -qt
@@ -221,6 +227,7 @@ test-lz4-basic: lz4 datagen
./datagen -g256MB | ./lz4 -vqB4D | ./lz4 -t
./datagen -g6GB | ./lz4 -vqB5D | ./lz4 -qt
./datagen -g6GB | ./lz4 -vq9BD | ./lz4 -qt
+ @rm tmp*
test-lz4: lz4 datagen test-lz4-basic test-lz4-multiple test-lz4-sparse test-lz4-contentSize test-lz4-frame-concatenation
@echo "\n ---- test pass-through ----"
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 8b80fbc..dc0b9ec 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -851,7 +851,6 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE
nextToLoad = LZ4F_decompress(ress.dCtx, ress.dstBuffer, &decodedBytes, (char*)(ress.srcBuffer)+pos, &remaining, NULL);
if (LZ4F_isError(nextToLoad)) EXM_THROW(66, "Decompression error : %s", LZ4F_getErrorName(nextToLoad));
pos += remaining;
- if (!nextToLoad) break;
if (decodedBytes)
{
@@ -860,6 +859,8 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE
DISPLAYUPDATE(2, "\rDecompressed : %u MB ", (unsigned)(filesize>>20));
storedSkips = LZ4IO_fwriteSparse(dstFile, ress.dstBuffer, decodedBytes, storedSkips);
}
+
+ if (!nextToLoad) break;
}
}