34 lines
1.9 KiB
Text
Vendored
34 lines
1.9 KiB
Text
Vendored
Zstandard / zstd (vendored into calog)
|
|
======================================
|
|
|
|
Zstandard (zstd), the fast real-time compression library by Meta Platforms
|
|
(https://github.com/facebook/zstd). calog builds it from source into
|
|
lib/libzstd.a as the zstd backend for the archive/compression library
|
|
(libarchive's zstd filter) and as a single, reproducible source of truth for
|
|
zstd across the whole build.
|
|
|
|
Vendored from zstd 1.5.6: only the buildable library subset, i.e. the .c/.h
|
|
files under lib/common, lib/compress and lib/decompress plus the public headers
|
|
lib/zstd.h and lib/zstd_errors.h. Preserves the common/compress/decompress
|
|
directory layout because the internal sources include "../zstd.h" and sibling
|
|
headers by relative path. libarchive needs zstd.h, found via -Ivendor/zstd.
|
|
|
|
Trimmed from the upstream tree: the CLI (programs/), tests, docs, examples,
|
|
contrib, the dictionary builder (lib/dictBuilder + zdict.h), the deprecated and
|
|
legacy format shims (lib/deprecated, lib/legacy), the DLL glue (lib/dll), and
|
|
all build scaffolding (Makefile, *.mk, *.pc.in, BUCK, module.modulemap).
|
|
|
|
Also removed: lib/decompress/huf_decompress_amd64.S (an x86-64-only assembly
|
|
fast path). calog compiles the portable C path instead by defining
|
|
ZSTD_DISABLE_ASM, so the object rules stay pure .c and portable to every target.
|
|
|
|
Single-threaded on purpose: ZSTD_MULTITHREAD is left UNDEFINED (zstd tests it
|
|
with #ifdef, so it must never be defined -- not even to 0), which keeps the
|
|
encoder single-threaded and calog's actor model and tsan targets clean. The
|
|
multithread source (lib/compress/zstdmt_compress.c) and the thread-pool shims
|
|
(lib/common/pool.c, lib/common/threading.c) are still vendored because the
|
|
build references them; with ZSTD_MULTITHREAD unset they compile to their
|
|
single-threaded no-op fallbacks.
|
|
|
|
No configure step is needed. License: BSD 3-Clause (zstd is dual-licensed
|
|
BSD-3 / GPLv2; calog uses the permissive BSD-3 option). See LICENSE.
|