The lib directory contains several directories. Depending on target use case, it's enough to include only files from relevant directories.
Zstandard's stable API is exposed within zstd.h, at the root of lib
directory.
Some additional API may be useful if you're looking into advanced features :
enum
, for precise error handling.zstd.h
, it will give access to advanced and experimental API. These APIs shall never be used with dynamic library ! They are not "stable", their definition may change in the future. Only static linking is allowed.Directory common/
is required in all circumstances. You can select to support compression only, by just adding files from the compress/
directory, In a similar way, you can build a decompressor-only library with the decompress/
directory.
Other optional functionalities provided are :
dictBuilder/
: this directory contains source files required to create dictionaries. The API can be consulted in dictBuilder/zdict.h
. It also depends on common/
and compress/
.
legacy/
: this directory contains source code to decompress previous versions of Zstd, starting from v0.1
. The main API can be consulted in legacy/zstd_legacy.h
. Note that it's required to compile the library with ZSTD_LEGACY_SUPPORT = 1
. Advanced API from each version can be found in its relevant header file. For example, advanced API for version v0.4
is in zstd_v04.h
. It also depends on common/
and decompress/
.
Streaming is currently provided by common/zbuff.h
.
The other files are not source code. There are :
make install
)