Home | History | Annotate | only in /external/lz4/lib/dll/example
Up to higher level directory
NameDateSize
fullbench-dll.sln21-Aug-20181.2K
fullbench-dll.vcxproj21-Aug-20189.9K
Makefile21-Aug-20182K
README.md21-Aug-20182.9K

README.md

      1 LZ4 Windows binary package
      2 ====================================
      3 
      4 #### The package contents
      5 
      6 - `lz4.exe`                  : Command Line Utility, supporting gzip-like arguments
      7 - `dll\liblz4.dll`           : The DLL of LZ4 library
      8 - `dll\liblz4.lib`           : The import library of LZ4 library for Visual C++
      9 - `example\`                 : The example of usage of LZ4 library
     10 - `include\`                 : Header files required with LZ4 library
     11 - `static\liblz4_static.lib` : The static LZ4 library
     12 
     13 
     14 #### Usage of Command Line Interface
     15 
     16 Command Line Interface (CLI) supports gzip-like arguments.
     17 By default CLI takes an input file and compresses it to an output file:
     18 ```
     19     Usage: lz4 [arg] [input] [output]
     20 ```
     21 The full list of commands for CLI can be obtained with `-h` or `-H`. The ratio can
     22 be improved with commands from `-3` to `-16` but higher levels also have slower
     23 compression. CLI includes in-memory compression benchmark module with compression
     24 levels starting from `-b` and ending with `-e` with iteration time of `-i` seconds.
     25 CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined
     26 into `-b1e18i1`.
     27 
     28 
     29 #### The example of usage of static and dynamic LZ4 libraries with gcc/MinGW
     30 
     31 Use `cd example` and `make` to build `fullbench-dll` and `fullbench-lib`.
     32 `fullbench-dll` uses a dynamic LZ4 library from the `dll` directory.
     33 `fullbench-lib` uses a static LZ4 library from the `lib` directory.
     34 
     35 
     36 #### Using LZ4 DLL with gcc/MinGW
     37 
     38 The header files from `include\` and the dynamic library `dll\liblz4.dll`
     39 are required to compile a project using gcc/MinGW.
     40 The dynamic library has to be added to linking options.
     41 It means that if a project that uses LZ4 consists of a single `test-dll.c`
     42 file it should be linked with `dll\liblz4.dll`. For example:
     43 ```
     44     gcc $(CFLAGS) -Iinclude\ test-dll.c -o test-dll dll\liblz4.dll
     45 ```
     46 The compiled executable will require LZ4 DLL which is available at `dll\liblz4.dll`.
     47 
     48 
     49 #### The example of usage of static and dynamic LZ4 libraries with Visual C++
     50 
     51 Open `example\fullbench-dll.sln` to compile `fullbench-dll` that uses a
     52 dynamic LZ4 library from the `dll` directory. The solution works with Visual C++
     53 2010 or newer. When one will open the solution with Visual C++ newer than 2010
     54 then the solution will upgraded to the current version.
     55 
     56 
     57 #### Using LZ4 DLL with Visual C++
     58 
     59 The header files from `include\` and the import library `dll\liblz4.lib`
     60 are required to compile a project using Visual C++.
     61 
     62 1. The header files should be added to `Additional Include Directories` that can
     63    be found in project properties `C/C++` then `General`.
     64 2. The import library has to be added to `Additional Dependencies` that can
     65    be found in project properties `Linker` then `Input`.
     66    If one will provide only the name `liblz4.lib` without a full path to the library
     67    the directory has to be added to `Linker\General\Additional Library Directories`.
     68 
     69 The compiled executable will require LZ4 DLL which is available at `dll\liblz4.dll`.
     70