summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-11-16 19:37:05 (GMT)
committerYann Collet <cyan@fb.com>2016-11-16 19:37:05 (GMT)
commit7fde7438d39f8452f89e3fee5ba4a16c502dffb0 (patch)
tree4f08a51bee65e79fc00122400bcb9d1c8ac9ff4e
parenta22ca9378be9ace2aa6d08b80f767241d759dc1b (diff)
parente9bec0fdcce0bdf68814bd03f1f0c03659494439 (diff)
downloadlz4-7fde7438d39f8452f89e3fee5ba4a16c502dffb0.zip
lz4-7fde7438d39f8452f89e3fee5ba4a16c502dffb0.tar.gz
lz4-7fde7438d39f8452f89e3fee5ba4a16c502dffb0.tar.bz2
Merge branch 'dev' of github.com:Cyan4973/lz4 into devv1.7.3
-rw-r--r--appveyor.yml61
-rw-r--r--lib/README.md8
-rw-r--r--lib/dll/example/Makefile (renamed from lib/dll/fullbench-dll/Makefile)12
-rw-r--r--lib/dll/example/README.md (renamed from lib/dll/README.md)38
-rw-r--r--lib/dll/example/fullbench-dll.sln (renamed from lib/dll/fullbench-dll/fullbench-dll.sln)0
-rw-r--r--lib/dll/example/fullbench-dll.vcxproj (renamed from lib/dll/fullbench-dll/fullbench-dll.vcxproj)0
-rw-r--r--programs/README.md15
-rw-r--r--tests/Makefile2
-rw-r--r--visual/README.md8
9 files changed, 73 insertions, 71 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 210f5d7..93c1101 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -55,30 +55,27 @@ build_script:
)
)
- if [%COMPILER%]==[gcc] if not [%PLATFORM%]==[clang] (
- MKDIR bin\dll bin\static bin\fullbench bin\include &&
- COPY tests\fullbench.c bin\fullbench\ &&
- COPY lib\xxhash.c bin\fullbench\ &&
- COPY lib\xxhash.h bin\fullbench\ &&
+ MKDIR bin\dll bin\static bin\example bin\include &&
+ COPY tests\fullbench.c bin\example\ &&
+ COPY lib\xxhash.c bin\example\ &&
+ COPY lib\xxhash.h bin\example\ &&
COPY lib\lz4.h bin\include\ &&
COPY lib\lz4hc.h bin\include\ &&
COPY lib\lz4frame.h bin\include\ &&
+ COPY lib\liblz4.a bin\static\liblz4_static.lib &&
COPY lib\dll\liblz4.* bin\dll\ &&
- COPY lib\dll\fullbench-dll\Makefile bin\ &&
- COPY lib\dll\fullbench-dll\fullbench-dll.* bin\fullbench\ &&
- COPY lib\dll\README.md bin\ &&
- COPY lib\liblz4.a bin\static\liblz4_static.lib
+ COPY lib\dll\example\Makefile bin\example\ &&
+ COPY lib\dll\example\fullbench-dll.* bin\example\ &&
+ COPY lib\dll\example\README.md bin\ &&
+ COPY programs\lz4.exe bin\lz4.exe
)
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw64] (
- 7z.exe a bin\liblz4_x64.zip .\bin\fullbench .\bin\dll .\bin\static .\bin\include .\bin\Makefile .\bin\README.md &&
- appveyor PushArtifact bin\liblz4_x64.zip &&
- COPY programs\lz4.exe bin\lz4.exe &&
- appveyor PushArtifact bin\lz4.exe
+ 7z.exe a bin\lz4_x64.zip NEWS .\bin\lz4.exe .\bin\README.md .\bin\example .\bin\dll .\bin\static .\bin\include &&
+ appveyor PushArtifact bin\lz4_x64.zip
)
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw32] (
- 7z.exe a bin\liblz4_x86.zip .\bin\fullbench .\bin\dll .\bin\static .\bin\include .\bin\Makefile .\bin\README.md &&
- appveyor PushArtifact bin\liblz4_x86.zip &&
- COPY programs\lz4.exe bin\lz4_32.exe &&
- appveyor PushArtifact bin\lz4_32.exe
+ 7z.exe a bin\lz4_x86.zip NEWS .\bin\lz4.exe .\bin\README.md .\bin\example .\bin\dll .\bin\static .\bin\include &&
+ appveyor PushArtifact bin\lz4_x86.zip
)
- if [%COMPILER%]==[gcc] (COPY tests\fullbench.exe programs\)
- if [%COMPILER%]==[visual] (
@@ -117,47 +114,27 @@ test_script:
)
artifacts:
- - path: bin\lz4.exe
- - path: bin\lz4_32.exe
- - path: bin\liblz4_x64.zip
- - path: bin\liblz4_x86.zip
+ - path: bin\lz4_x64.zip
+ - path: bin\lz4_x86.zip
deploy:
- provider: GitHub
+ artifact: bin\lz4_x64.zip
auth_token:
secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
- artifact: bin\lz4.exe
force_update: true
+ prerelease: true
on:
COMPILER: gcc
PLATFORM: "mingw64"
appveyor_repo_tag: true
- provider: GitHub
+ artifact: bin\lz4_x86.zip
auth_token:
secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
- artifact: bin\lz4_32.exe
- force_update: true
- on:
- COMPILER: gcc
- PLATFORM: "mingw32"
- appveyor_repo_tag: true
-
-- provider: GitHub
- auth_token:
- secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
- artifact: bin\liblz4_x64.zip
- force_update: true
- on:
- COMPILER: gcc
- PLATFORM: "mingw64"
- appveyor_repo_tag: true
-
-- provider: GitHub
- auth_token:
- secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
- artifact: bin\liblz4_x86.zip
force_update: true
+ prerelease: true
on:
COMPILER: gcc
PLATFORM: "mingw32"
diff --git a/lib/README.md b/lib/README.md
index 430be1f..18793d4 100644
--- a/lib/README.md
+++ b/lib/README.md
@@ -42,12 +42,16 @@ It must be used with static linking ***only***.
DLL can be created using MinGW+MSYS with the `make liblz4` command.
This command creates `dll\liblz4.dll` and the import library `dll\liblz4.lib`.
-To compile a project the import library has to be added to linking options.
+The import library is only required with Visual C++.
+The header files `lz4.h`, `lz4hc.h`, `lz4frame.h` and the dynamic library
+`dll\liblz4.dll` are required to compile a project using gcc/MinGW.
+The dynamic library has to be added to linking options.
It means that if a project that uses LZ4 consists of a single `test-dll.c`
file it should be compiled with "liblz4.lib". For example:
```
- gcc $(CFLAGS) test-dll.c -o test-dll liblz4.lib
+ gcc $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\liblz4.dll
```
+The compiled executable will require LZ4 DLL which is available at `dll\liblz4.dll`.
#### Miscellaneous
diff --git a/lib/dll/fullbench-dll/Makefile b/lib/dll/example/Makefile
index 32e13fc..e987956 100644
--- a/lib/dll/fullbench-dll/Makefile
+++ b/lib/dll/example/Makefile
@@ -24,7 +24,9 @@
# ##########################################################################
VOID := /dev/null
-LZ4DIR := ./include
+LZ4DIR := ../include
+LIBDIR := ../static
+DLLDIR := ../dll
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \
@@ -50,11 +52,11 @@ default: all
all: fullbench-dll fullbench-lib
-fullbench-lib: fullbench/fullbench.c fullbench/xxhash.c
- $(CC) $(FLAGS) $^ -o $@$(EXT) static/liblz4_static.lib
+fullbench-lib: fullbench.c xxhash.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/liblz4_static.lib
-fullbench-dll: fullbench/fullbench.c fullbench/xxhash.c
- $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 dll/liblz4.lib
+fullbench-dll: fullbench.c xxhash.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(DLLDIR)/liblz4.dll
clean:
@$(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \
diff --git a/lib/dll/README.md b/lib/dll/example/README.md
index 779b8ae..4908663 100644
--- a/lib/dll/README.md
+++ b/lib/dll/example/README.md
@@ -1,38 +1,54 @@
-The static and dynamic LZ4 libraries
+LZ4 Windows binary package
====================================
#### The package contents
-- `dll\liblz4.dll` : The DLL of LZ4 library
-- `dll\liblz4.lib` : The import library of LZ4 library
-- `include\` : Header files required with LZ4 library
-- `fullbench\` : The example of usage of LZ4 library
+- `lz4.exe` : Command Line Utility, supporting gzip-like arguments
+- `dll\liblz4.dll` : The DLL of LZ4 library
+- `dll\liblz4.lib` : The import library of LZ4 library for Visual C++
+- `example\` : The example of usage of LZ4 library
+- `include\` : Header files required with LZ4 library
- `static\liblz4_static.lib` : The static LZ4 library
+#### Usage of Command Line Interface
+
+Command Line Interface (CLI) supports gzip-like arguments.
+By default CLI takes an input file and compresses it to an output file:
+```
+ Usage: lz4 [arg] [input] [output]
+```
+The full list of commands for CLI can be obtained with `-h` or `-H`. The ratio can
+be improved with commands from `-3` to `-16` but higher levels also have slower
+compression. CLI includes in-memory compression benchmark module with compression
+levels starting from `-b` and ending with `-e` with iteration time of `-i` seconds.
+CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined
+into `-b1e18i1`.
+
+
#### The example of usage of static and dynamic LZ4 libraries with gcc/MinGW
-Use `make` to build `fullbench-dll` and `fullbench-lib`.
+Use `cd example` and `make` to build `fullbench-dll` and `fullbench-lib`.
`fullbench-dll` uses a dynamic LZ4 library from the `dll` directory.
`fullbench-lib` uses a static LZ4 library from the `lib` directory.
#### Using LZ4 DLL with gcc/MinGW
-The header files from `include\` and the import library `dll\liblz4.lib`
+The header files from `include\` and the dynamic library `dll\liblz4.dll`
are required to compile a project using gcc/MinGW.
-The import library has to be added to linking options.
+The dynamic library has to be added to linking options.
It means that if a project that uses LZ4 consists of a single `test-dll.c`
-file it should be compiled with "liblz4.lib". For example:
+file it should be compiled with "liblz4.dll". For example:
```
- gcc $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\liblz4.lib
+ gcc $(CFLAGS) -Iinclude\ test-dll.c -o test-dll dll\liblz4.dll
```
The compiled executable will require LZ4 DLL which is available at `dll\liblz4.dll`.
#### The example of usage of static and dynamic LZ4 libraries with Visual C++
-Open `fullbench\fullbench-dll.sln` to compile `fullbench-dll` that uses a
+Open `example\fullbench-dll.sln` to compile `fullbench-dll` that uses a
dynamic LZ4 library from the `dll` directory. The solution works with Visual C++
2010 or newer. When one will open the solution with Visual C++ newer than 2010
then the solution will upgraded to the current version.
diff --git a/lib/dll/fullbench-dll/fullbench-dll.sln b/lib/dll/example/fullbench-dll.sln
index 72e302e..72e302e 100644
--- a/lib/dll/fullbench-dll/fullbench-dll.sln
+++ b/lib/dll/example/fullbench-dll.sln
diff --git a/lib/dll/fullbench-dll/fullbench-dll.vcxproj b/lib/dll/example/fullbench-dll.vcxproj
index cdb5534..cdb5534 100644
--- a/lib/dll/fullbench-dll/fullbench-dll.vcxproj
+++ b/lib/dll/example/fullbench-dll.vcxproj
diff --git a/programs/README.md b/programs/README.md
index b67408f..2ad0449 100644
--- a/programs/README.md
+++ b/programs/README.md
@@ -21,7 +21,7 @@ It makes benchmark more precise as it eliminates I/O overhead.
The benchmark measures ratio, compressed size, compression and decompression speed.
One can select compression levels starting from `-b` and ending with `-e`.
-The `-i` parameter selects a number of iterations used for each of tested levels.
+The `-i` parameter selects a number of seconds used for each of tested levels.
@@ -39,6 +39,7 @@ Arguments :
-d : decompression (default for .lz4 extension)
-z : force compression
-f : overwrite output without prompting
+--rm : remove source file(s) after successful de/compression
-h/-H : display help/long help and exit
Advanced arguments :
@@ -48,18 +49,20 @@ Advanced arguments :
-c : force write to standard output, even if it is the console
-t : test compressed file integrity
-m : multiple input files (implies automatic output filenames)
+ -r : operate recursively on directories (sets also -m)
-l : compress using Legacy format (Linux kernel compression)
- -B# : Block size [4-7](default : 7)
+ -B# : Block size [4-7] (default : 7)
-BD : Block dependency (improve compression ratio)
--no-frame-crc : disable stream checksum (default:enabled)
--content-size : compressed frame includes original size (default:not present)
--[no-]sparse : sparse mode (default:enabled on file, disabled on stdout)
Benchmark arguments :
-Benchmark arguments :
-b# : benchmark file(s), using # compression level (default : 1)
- -e# : test all compression levels from -bX to # (default: 1)
- -i# : iteration loops [1-9](default : 3), benchmark mode only
- ```
+ -e# : test all compression levels from -bX to # (default : 1)
+ -i# : minimum evaluation time in seconds (default : 3s)
+ -B# : cut file into independent blocks of size # bytes [32+]
+ or predefined block size [4-7] (default: 7)
+```
#### License
diff --git a/tests/Makefile b/tests/Makefile
index 2132f85..4e96769 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -94,7 +94,7 @@ fullbench-lib: fullbench.c $(LZ4DIR)/xxhash.c
fullbench-dll: fullbench.c $(LZ4DIR)/xxhash.c
$(MAKE) -C $(LZ4DIR) liblz4
- $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LZ4DIR)/dll/liblz4.lib
+ $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LZ4DIR)/dll/liblz4.dll
fuzzer : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/xxhash.o fuzzer.c
$(CC) $(FLAGS) $^ -o $@$(EXT)
diff --git a/visual/README.md b/visual/README.md
index 4e76eb2..216971f 100644
--- a/visual/README.md
+++ b/visual/README.md
@@ -22,7 +22,7 @@ The following projects are included with the lz4 distribution:
#### Projects available within lz4.sln
The Visual Studio solution file `lz4.sln` contains many projects that will be compiled to the
-`visual\VS2010\bin\$(Platform)_$(Configuration)\lz4.exe` directory. For example `lz4` set to `x64` and
+`visual\VS2010\bin\$(Platform)_$(Configuration)` directory. For example `lz4` set to `x64` and
`Release` will be compiled to `visual\VS2010\bin\x64_Release\lz4.exe`. The solution file contains the
following projects:
@@ -43,11 +43,11 @@ The header files `lib\lz4.h`, `lib\lz4hc.h`, `lib\lz4frame.h` and the import lib
project using Visual C++.
1. The path to header files should be added to `Additional Include Directories` that can
- be found in project properties `C/C++` then `General`.
+ be found in Project Properties of Visual Studio IDE in the `C/C++` Property Pages on the `General` page.
2. The import library has to be added to `Additional Dependencies` that can
- be found in project properties `Linker` then `Input`.
+ be found in Project Properties in the `Linker` Property Pages on the `Input` page.
If one will provide only the name `liblz4.lib` without a full path to the library
- the directory has to be added to `Linker\General\Additional Library Directories`.
+ then the directory has to be added to `Linker\General\Additional Library Directories`.
The compiled executable will require LZ4 DLL which is available at
`visual\VS2010\bin\$(Platform)_$(Configuration)\liblz4.dll`.