• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MakefileH A D16-Oct-20171.4 KiB4826

README.mdH A D08-Jun-20173 KiB7050

build_package.batH A D27-Sep-2019784 2120

fullbench-dll.slnH A D08-Jun-20171.2 KiB2625

fullbench-dll.vcxprojH A D08-Jun-20179.9 KiB181181

README.md

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