src/zstd/lib/README.md

Zstandard library files

The lib directory is split into several sub-directories, in order to make it easier to select or exclude features.

Building

Makefile script is provided, supporting all standard Makefile conventions, including commands variables, staged install, directory variables and standard targets. - make : generates both static and dynamic libraries - make install : install libraries in default system directories

libzstd default scope includes compression, decompression, dictionary building, and decoding support for legacy formats >= v0.5.0.

API

Zstandard's stable API is exposed within lib/zstd.h.

Advanced API

Optional advanced features are exposed via :

Modular build

It's possible to compile only a limited set of features.

Multithreading support

Multithreading is disabled by default when building with make. Enabling multithreading requires 2 conditions : - set macro ZSTD_MULTITHREAD - on POSIX systems : compile with pthread (-pthread compilation flag for gcc)

Both conditions are automatically triggered by invoking make lib-mt target. Note that, when linking a POSIX program with a multithreaded version of libzstd, it's necessary to trigger -pthread flag during link stage.

Multithreading capabilities are exposed via advanced API ZSTD_compress_generic() defined in lib/zstd.h. This API is still considered experimental, but is expected to become "stable" at some point in the future.

Windows : using MinGW+MSYS to create DLL

DLL can be created using MinGW+MSYS with the make libzstd command. This command creates dll\libzstd.dll and the import library dll\libzstd.lib. The import library is only required with Visual C++. The header file zstd.h and the dynamic library dll\libzstd.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 ZSTD consists of a single test-dll.c file it should be linked with dll\libzstd.dll. For example:

    gcc $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\libzstd.dll

The compiled executable will require ZSTD DLL which is available at dll\libzstd.dll.

Deprecated API

Obsolete API on their way out are stored in directory lib/deprecated. At this stage, it contains older streaming prototypes, in lib/deprecated/zbuff.h. These prototypes will be removed in some future version. Consider migrating code towards supported streaming API exposed in zstd.h.

Miscellaneous

The other files are not source code. There are :



Try the seqminer package in your browser

Any scripts or data that you put into this service are public.

seqminer documentation built on Sept. 2, 2023, 9:08 a.m.