zstd/lib/README.md

58 lines
2.2 KiB
Markdown
Raw Normal View History

zstd - library files
================================
2016-07-17 11:42:21 -07:00
The __lib__ directory contains several directories.
Depending on target use case, it's enough to include only files from relevant directories.
2016-07-17 11:42:21 -07:00
#### API
2016-04-25 02:31:28 -07:00
2016-07-17 11:42:21 -07:00
Zstandard's stable API is exposed within [zstd.h](zstd.h),
at the root of `lib` directory.
2016-03-09 16:09:41 -08:00
2016-07-17 11:42:21 -07:00
#### Advanced API
2016-04-25 02:36:44 -07:00
2016-07-17 11:42:21 -07:00
Some additional API may be useful if you're looking into advanced features :
- common/error_public.h : transform function result into an `enum`,
for precise error handling.
- ZSTD_STATIC_LINKING_ONLY : if you define this macro _before_ including `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.
2016-04-25 02:31:28 -07:00
2016-07-17 11:42:21 -07:00
#### Modular build
2016-04-25 02:31:28 -07:00
2016-07-17 11:42:21 -07:00
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.
2016-03-09 16:09:41 -08:00
2016-07-17 11:42:21 -07:00
Other optional functionalities provided are :
2016-07-17 11:42:21 -07:00
- `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/` .
2016-07-17 11:42:21 -07:00
- `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/` .
2016-07-08 01:42:59 -07:00
2016-07-17 11:42:21 -07:00
#### Streaming API
2016-07-17 11:42:21 -07:00
Streaming is currently provided by `common/zbuff.h`.
#### Miscellaneous
The other files are not source code. There are :
- LICENSE : contains the BSD license text
2016-07-17 11:42:21 -07:00
- Makefile : script to compile or install zstd library (static and dynamic)
- libzstd.pc.in : for pkg-config (`make install`)