* chore(ci): with cmake verbose, temporarily
* chore(cmake): prefer Threads::Threads
* fix(cmake): debug building gtest on ubuntu 20.04 for the moment
* fix(cmake): try adding Threads::Threads
* fix(cmake): debug building gtest on ubuntu 20.04 for the moment
* fix(cmake): revert taosd-ci-build.yml
* fix(cmake): debug building on ubuntu 20.04 for the moment
* fix(cmake): debug building on ubuntu 20.04 for the moment
* fix(cmake): debug building on ubuntu 20.04 for the moment, adding dl right after DEP_ext_libuv
* fix(cmake): debug building on ubuntu 20.04 for the moment, try full run
* fix(cmake): fix building on ubuntu 20.04
* fix(cmake): dl is only valid in non-windows platform
* fix(cmake): dl order
* refactor(cmake): adjust option/cache variables for external dependencies
* refactor(cmake): mv patch files from contrib/ to cmake/
* refactor(cmake): typo
* refactor(cmake): adding cache on ci
* refactor(cmake):
1. ext_lzma2 is only used by Linux
2. fix bug in taosd-ci-build.yml
* enh: adding functionalities of build.sh
* fix(ci): `cmake -B` shall maintain consistency
* refactor(cmake): LOCAL_REPO/LOCAL_URL as cache variable
* refactor(cmake): taosadapter to be built in main build directory rather than .externals
* refactor(cmake): adding rpath for taosadapter, linux now
* refactor(cmake): adding rpath for taosadapter, macos now
* chore(cmake): remove some comments
* debug(ci): bypass TD_EXTERNALS_USE_ONLY
* debug(ci): bypass .externals caching for the moment
* fix(cmake): temporarily use taosadapter/main branch because this branch(freemine.cmake.3.0) has not include taos_fetch_fields_e from upstream
* refactor(cmake): clean GIT_TAG/GIT_SHALLOW pairs
* enh(ci): use build.sh rather than hard-coded in taosd-ci-build.yml, linux for now
* debug(ci): undefined __isoc23_strtoull
* debug(ci): benchmarkTest
* debug(ci): what if use_only = off
* debug(ci): remove .externals to make a refresh build
* debug(ci): back to cache, and ls files of gtest
* debug(ci): remove find coz {} not escaped
* debug(ci): cache key seems missing "matrix.os"
* refactor(ci): fixed cache key and reopen macos/windows
* chore(ci): literally -j4
* chore(ci): Trigger GitHub Actions re-run
* chore(ci): Trigger GitHub Actions re-run
* fix(ci): typo
* chore(ci): JOBS calculated by build.sh itself
* refactor(ci): enable WEBSOCKET in build.sh by default
* refactor(ci): enable WEBSOCKET in build.sh by default, macOS
* chore(cmake): remove obsoletes
* refactor(ci): stop service before running taosd
* chore(ci): `./build.sh install` just install TDengine, you will have to start taosd by `./build.sh start`
* refactor(cmake): adding source code found on http://emfisis.physics.uiowa.edu/Software/C/libargp/
* refactor(cmake): moving jansson/snappy/avro to .externals, and porting BUILD_TEST/WEBSOCKET on Windows
* refactor(cmake): porting linux
* refactor(cmake): porting macos
1. check argp.h
2. re-enable building taosdump
* refactor(cmake): porting linux
1. adjust CMAKE_C/CXX_FLAGS
* refactor(cmake): porting windows, adjust CMAKE_C/CXX_FLAGS
* refactor(cmake): use cmake_parse_arguments in macro INIT_EXT
* refactor(cmake): format ci cache directives
* refactor(cmake): adding comments for ci externals-cache directives
* refactor(cmake): adding check_env.cmake to checking libraries installed on the system
* refactor(cmake): porting linux, make homebrew-installed-libs available
* refactor(cmake): remove BYPRODUCTS from INIT_EXT macro
* refactor(cmake): INC_DIR is oneValueArg
* refactor(cmake): taosdump depends on ext_xz(LZMA)
* refactor(cmake): add copy_pthreadVC3 target on windows
* refactor(cmake): mv taosd-ci-build.yml to tdengine-build.yml
* chore(ci): try to fix yml syntax error
* refactor(cmake): use brew --prefix to get HomeBrew's install path
* refactor(cmake): typo
* debug(ci): build and cache externals first
* debug(ci): adding -Wno-stringop-overread for the moment
* debug(ci): make Threads::Threads public from os target
* debug(ci): make os public
* debug(ci): re-enable start and test
* debug(ci): let it go even if taosBenchmark failed
* debug(ci): copy logic from TDengine/main
* debug(ci): try ./build.sh start/test
* debug(ci): revert to original simple test logic in ci, taosBenchark/taos
* chore(cmake): code-convention and ci-logic
* debug(ci): show versions
* debug(ci): forcefully use specific GIT_TAG by commit-id for taos-connector-rust.git and taosadapter.git
* refactor(cmake): remove empty lines
* debug(ci): typo
* debug(ci): set supportVnodes to 256 before starting taosd
* debug(ci): fix: sudo and pipe
* debug(ci): cat /etc/taos/taos.cfg to check if supportVnodes effective
* debug(ci): cat forceReadConfig to taos.cfg
* debug(ci): adding taos -s "show dnodes"
* debug(ci): print more info
* debug(ci):
1. git log .... in an independant step
2. sleep 3 deliberately
* build: release ver-3.3.6.0
* chore(ci): comment and remove unnecessary code
* refactor(ci): cleanup tools/CMakeLists.txt
1. remove unnecessary or uneffective codes
2. better approach to pass compile flags to go
* chore(cmake): remove unnecessary code
* merge(cmake): porting linux
* merge(cmake): porting macOS
* merge(cmake): porting windows
* merge(cmake): pitfall fix: use literal format string instead
* merge(cmake): ver-3.3.6.0 for both taosadatper and taosws
* merge(cmake): adjust ci for debug purposes
* merge(cmake): add dependenices to make sure native built
* merge(main): link os
* merge(main): revert to main
* chore(cmake): remove freemine'd comments
* chore(cmake): make github ci to run with empty change
* refactor(cmake): remove unnecessaries
* refactor(cmake): remove unnecessaries
* chore(cmake):
1. remove taosudf in build.sh::do_purge
2. packaging taosBenchmark
* chore(cmake):
1. typo corrections
2. add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to bypass compatibility check imposed by latest cmake since 4.0
* chore(cmake): show cmake version
* chore(cmake): add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to bypass compatibility check imposed by latest cmake since 4.0
* chore(cmake): typo
* chore(cmake): remove unnecessaries
* cmake: debug enterprise compilation
* refactor: preparatory work before merging the freemin PR
* refactor(cmake): revert to
|
||
|---|---|---|
| .. | ||
| common | ||
| compress | ||
| decompress | ||
| deprecated | ||
| dictBuilder | ||
| legacy | ||
| LICENSE | ||
| README.md | ||
| zstd.h | ||
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 librariesmake install: install libraries in default system directories
libzstd default scope includes compression, decompression, dictionary building,
and decoding support for legacy formats >= v0.4.0.
API
Zstandard's stable API is exposed within lib/zstd.h.
Advanced API
Optional advanced features are exposed via :
lib/common/zstd_errors.h: translatessize_tfunction results into anZSTD_ErrorCode, for accurate error handling.ZSTD_STATIC_LINKING_ONLY: if this macro is defined before includingzstd.h, it unlocks access to advanced experimental API, exposed in second part ofzstd.h. These APIs are not "stable", their definition may change in the future. As a consequence, it shall never be used with dynamic library ! Only static linking is allowed.
Modular build
It's possible to compile only a limited set of features.
- Directory
lib/commonis always required, for all variants. - Compression source code lies in
lib/compress - Decompression source code lies in
lib/decompress - It's possible to include only
compressor onlydecompress, they don't depend on each other. lib/dictBuilder: makes it possible to generate dictionaries from a set of samples. The API is exposed inlib/dictBuilder/zdict.h. This module depends on bothlib/commonandlib/compress.lib/legacy: source code to decompress legacy zstd formats, starting fromv0.1.0. This module depends onlib/commonandlib/decompress. To enable this feature, it's required to defineZSTD_LEGACY_SUPPORTduring compilation. Typically, withgcc, add argument-DZSTD_LEGACY_SUPPORT=1. Using higher number limits versions supported. For example,ZSTD_LEGACY_SUPPORT=2means : "support legacy formats >= v0.2.0".ZSTD_LEGACY_SUPPORT=3means : "support legacy formats >= v0.3.0", and so on. Starting v0.8.0, all versions ofzstdproduce frames compliant with specification. As a consequence,ZSTD_LEGACY_SUPPORT=8(or more) doesn't trigger legacy support. Also,ZSTD_LEGACY_SUPPORT=0means "do not support legacy formats". Once enabled, this capability is transparently triggered within decompression functions. It's also possible to invoke directly legacy API, as exposed inlib/legacy/zstd_legacy.h. Each version also provides an additional dedicated set of advanced API. For example, advanced API for versionv0.4is exposed inlib/legacy/zstd_v04.h. Note :lib/legacyonly supports decoding legacy formats.- Similarly, you can define
ZSTD_LIB_COMPRESSION, ZSTD_LIB_DECOMPRESSION,ZSTD_LIB_DICTBUILDER, andZSTD_LIB_DEPRECATEDas 0 to forgo compilation of the corresponding features. This will also disable compilation of all dependencies (eg.ZSTD_LIB_COMPRESSION=0will also disable dictBuilder).
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 (
-pthreadcompilation flag forgcc)
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 :
LICENSE: contains the BSD license textMakefile:makescript to build and install zstd library (static and dynamic)BUCK: support forbuckbuild system (https://buckbuild.com/)libzstd.pc.in: forpkg-config(used inmake install)README.md: this file