diff --git a/Makefile b/Makefile index a1b6d123..4ee569e1 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ # ################################################################ # Version number -export VERSION := 0.4.2 +export VERSION := 0.4.3 PRGDIR = programs ZSTDDIR = lib diff --git a/NEWS b/NEWS index 00cfb8c2..33b8dfc6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +v0.4.3 : +new : zstd-frugal + v0.4.2 : Generic minor improvements for small blocks Fixed : big-endian compatibility, by Peter Harris (#85) diff --git a/programs/Makefile b/programs/Makefile index 17fed5b0..15b4e05c 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -30,7 +30,7 @@ # fullbench32: Same as fullbench, but forced to compile in 32-bits mode # ########################################################################## -VERSION?= 0.4.2 +VERSION?= 0.4.3 DESTDIR?= PREFIX ?= /usr/local @@ -89,6 +89,13 @@ zstd-pgo : clean zstd rm zstd $(MAKE) zstd MOREFLAGS=-fprofile-use +zstd-noBench: $(ZSTD_FILES) $(ZSTDDIR)/zstd_buffered.c \ + zstdcli.c fileio.c $(ZSTD_FILEIO_LEGACY) + $(CC) $(FLAGS) -DZSTD_NOBENCH $^ -o zstd$(EXT) + +zstd-frugal: clean + CFLAGS=-Os $(MAKE) zstd-noBench ZSTD_LEGACY_SUPPORT=0 + fullbench : $(ZSTD_FILES) \ datagen.c fullbench.c $(CC) $(FLAGS) $^ -o $@$(EXT) diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 7904a616..8c80b157 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -138,11 +138,13 @@ static int usage_advanced(const char* programName) DISPLAY( " -q : suppress warnings; specify twice to suppress errors too\n"); DISPLAY( " -c : force write to standard output, even if it is the console\n"); //DISPLAY( " -t : test compressed file integrity\n"); +#ifndef ZSTD_NOBENCH DISPLAY( "Benchmark arguments :\n"); DISPLAY( " -b# : benchmark file(s), using # compression level (default : 1) \n"); DISPLAY( " -B# : cut file into independent blocks of size # (default : no block)\n"); DISPLAY( " -i# : iteration loops [1-9](default : 3)\n"); DISPLAY( " -r# : test all compression levels from 1 to # (default : disabled)\n"); +#endif return 0; } @@ -169,17 +171,19 @@ int main(int argCount, const char** argv) bench=0, decode=0, forceStdout=0, - main_pause=0, - rangeBench = 1; - unsigned fileNameStart = 0; - unsigned nbFiles = 0; + main_pause=0; unsigned cLevel = 1; const char* programName = argv[0]; const char* inFileName = NULL; const char* outFileName = NULL; char* dynNameSpace = NULL; const char extension[] = ZSTD_EXTENSION; + unsigned fileNameStart = 0; + unsigned nbFiles = 0; + int rangeBench = 1; + /* init */ + (void)rangeBench; (void)nbFiles; (void)fileNameStart; /* not used when ZSTD_NOBENCH set */ displayOut = stderr; /* Pick out basename component. Don't rely on stdlib because of conflicting behavior. */ for (i = (int)strlen(programName); i > 0; i--) { if (programName[i] == '/') { i++; break; } } @@ -260,6 +264,7 @@ int main(int argCount, const char** argv) /* keep source file (default anyway, so useless; only for xz/lzma compatibility) */ case 'k': argument++; break; +#ifndef ZSTD_NOBENCH /* Benchmark */ case 'b': bench=1; argument++; break; @@ -293,6 +298,7 @@ int main(int argCount, const char** argv) rangeBench = -1; argument++; break; +#endif /* ZSTD_NOBENCH */ /* Pause at the end (hidden option) */ case 'p': main_pause=1; argument++; break; @@ -320,7 +326,13 @@ int main(int argCount, const char** argv) DISPLAYLEVEL(3, WELCOME_MESSAGE); /* Check if benchmark is selected */ - if (bench) { BMK_benchFiles(argv+fileNameStart, nbFiles, cLevel*rangeBench); goto _end; } + if (bench) + { +#ifndef ZSTD_NOBENCH + BMK_benchFiles(argv+fileNameStart, nbFiles, cLevel*rangeBench); +#endif + goto _end; + } /* No input filename ==> use stdin */ if(!inFileName) { inFileName=stdinmark; }