From 488029ec3b23b1e00a69f1ac3fcdd49d24cb7d3f Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sat, 7 Mar 2015 13:23:00 +0100 Subject: Updated : compress multiple files --- NEWS | 5 ++ programs/Makefile | 8 ++- programs/bench.c | 8 +-- programs/bench.h | 4 +- programs/lz4cli.c | 167 +++++++++++++++++++++++++++--------------------------- programs/lz4io.c | 33 +++++++++-- programs/lz4io.h | 8 ++- 7 files changed, 132 insertions(+), 101 deletions(-) diff --git a/NEWS b/NEWS index 8aeab1b..05ac6b5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +r128: +New : command -m, to compress multiple files in a single command +Fixed : Restored lz4hc compression ratio (slightly lower since r124) +Added : Visual project directory + r126: New : lz4frame API is now integrated into liblz4 Fixed : GCC 4.9 bug on highest performance settings, reported by Greg Slazinski diff --git a/programs/Makefile b/programs/Makefile index 076d3bf..1070f40 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -31,7 +31,7 @@ # fullbench32: Same as fullbench, but forced to compile in 32-bits mode # ########################################################################## -RELEASE?= r126 +RELEASE?= r128 DESTDIR?= PREFIX ?= /usr @@ -158,6 +158,12 @@ test-lz4: lz4 datagen @rm *.test @echo frame concatenation test completed # test frame concatenation with null-length frame + @echo test multiple input files + @./datagen -s1 > file1 + @./datagen -s2 > file2 + @./datagen -s3 > file3 + ./lz4 -f -m file1 file2 file3 + @rm file1 file2 file3 file1.lz4 file2.lz4 file3.lz4 test-lz4c: lz4c datagen diff --git a/programs/bench.c b/programs/bench.c index 02e56c9..77120f2 100644 --- a/programs/bench.c +++ b/programs/bench.c @@ -1,6 +1,6 @@ /* bench.c - Demo program to benchmark open-source compression algorithm - Copyright (C) Yann Collet 2012-2014 + Copyright (C) Yann Collet 2012-2015 GPL v2 License This program is free software; you can redistribute it and/or modify @@ -215,7 +215,7 @@ static size_t BMK_findMaxMem(U64 requiredMem) } -static U64 BMK_GetFileSize(char* infilename) +static U64 BMK_GetFileSize(const char* infilename) { int r; #if defined(_MSC_VER) @@ -234,7 +234,7 @@ static U64 BMK_GetFileSize(char* infilename) * Public function **********************************************************/ -int BMK_benchFile(char** fileNamesTable, int nbFiles, int cLevel) +int BMK_benchFile(const char** fileNamesTable, int nbFiles, int cLevel) { int fileIdx=0; char* orig_buff; @@ -265,7 +265,7 @@ int BMK_benchFile(char** fileNamesTable, int nbFiles, int cLevel) while (fileIdx