Zstandard lossless compression algorithm C library
This is a build2
package for the
zstd
C library. It provides a
fast lossless compression algorithm, targeting real-time compression scenarios
at zlib
-level and better compression ratios. Zstandard's format is stable
and documented in RFC8878.
Usage
To start using libzstd
in your project, add the following depends
value to your manifest
, adjusting the version constraint as appropriate:
depends: libzstd ^1.5.5
Then import the library in your buildfile
:
import libs = libzstd%lib{zstd}
Note also that the lib{zstd}
library provides build2
metadata that
describes its configuration:
... More
version | 1.5.5+1 |
---|---|
license | BSD-3-Clause OR GPL-2.0-only |
repository | https://stage.build2.org/1 |
download | libzstd-1.5.5+1.tar.gz |
sha256 | 66a6da51efe2c957cfefdc0b2b89dc066d9d3a7ebd7be8e1b0497b17e23b0a9f |
project | zstd |
---|---|
url | github.com/facebook/zstd |
package-url | github.com/build2-packaging/zstd |
package-email | packaging@build2.orgMailing list |
Builds
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_14-static_O3 |
timestamp | 2025-09-06 18:30:04 UTC (11:48:54 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_14-ndebug_O3 |
timestamp | 2025-09-06 18:29:16 UTC (11:49:42 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_14-O3 |
timestamp | 2025-09-06 18:28:27 UTC (11:50:31 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_14 |
timestamp | 2025-09-06 18:27:36 UTC (11:51:23 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_18_libc++-static_O3 |
timestamp | 2025-09-06 17:30:39 UTC (12:48:19 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_18_libc++-O3 |
timestamp | 2025-09-06 17:29:59 UTC (12:48:59 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_18_libc++ |
timestamp | 2025-09-06 17:29:20 UTC (12:49:39 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_18-static_O3 |
timestamp | 2025-09-06 17:28:42 UTC (12:50:17 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_18-O3 |
timestamp | 2025-09-06 17:28:07 UTC (12:50:51 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_18 |
timestamp | 2025-09-06 17:27:26 UTC (12:51:32 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.8-static_O2 |
timestamp | 2025-09-06 13:28:33 UTC (16:50:25 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.8-O2 |
timestamp | 2025-09-06 13:27:43 UTC (16:51:15 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.8 |
timestamp | 2025-09-06 13:26:30 UTC (16:52:29 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_11_tsan-gcc_11.3 |
timestamp | 2025-09-06 13:16:16 UTC (17:02:43 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-w64-mingw32 |
tgt config | windows_10-gcc_14.2_mingw_w64-static_O2 |
timestamp | 2025-09-06 13:10:23 UTC (17:08:35 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-w64-mingw32 |
tgt config | windows_10-gcc_14.2_mingw_w64-O2 |
timestamp | 2025-09-06 13:09:27 UTC (17:09:31 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-w64-mingw32 |
tgt config | windows_10-gcc_14.2_mingw_w64 |
timestamp | 2025-09-06 13:08:28 UTC (17:10:30 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_fedora_41-gcc_14-bindist |
timestamp | 2025-09-06 12:52:39 UTC (17:26:20 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_fedora_42-gcc_15-bindist |
timestamp | 2025-09-06 12:51:40 UTC (17:27:18 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_ubuntu_24.04-gcc_13-bindist |
timestamp | 2025-09-06 12:51:07 UTC (17:27:52 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_12-bindist |
timestamp | 2025-09-06 12:50:29 UTC (17:28:29 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_11_tsan-clang_14.0 |
timestamp | 2025-09-06 12:49:57 UTC (17:29:01 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_11_asan-gcc_11.3 |
timestamp | 2025-09-06 12:49:35 UTC (17:29:24 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_11_asan-clang_14.0 |
timestamp | 2025-09-06 12:49:02 UTC (17:29:56 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_14-static_O3 |
timestamp | 2025-09-06 12:39:41 UTC (17:39:17 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_14-ndebug_O3 |
timestamp | 2025-09-06 12:38:58 UTC (17:40:00 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_14-O3 |
timestamp | 2025-09-06 12:38:05 UTC (17:40:53 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_14 |
timestamp | 2025-09-06 12:37:15 UTC (17:41:43 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_18_libc++-static_O3 |
timestamp | 2025-09-06 11:48:37 UTC (18:30:21 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_18_libc++-O3 |
timestamp | 2025-09-06 11:48:08 UTC (18:30:50 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_18_libc++ |
timestamp | 2025-09-06 11:47:34 UTC (18:31:25 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_18-static_O3 |
timestamp | 2025-09-06 11:47:04 UTC (18:31:54 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_18-O3 |
timestamp | 2025-09-06 11:46:32 UTC (18:32:26 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_18 |
timestamp | 2025-09-06 11:45:58 UTC (18:33:00 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.10-static_O2 |
timestamp | 2025-09-06 11:22:41 UTC (18:56:18 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.10-O2 |
timestamp | 2025-09-06 11:21:25 UTC (18:57:34 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.10 |
timestamp | 2025-09-06 11:19:50 UTC (18:59:08 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-freebsd14.1 |
tgt config | freebsd_14-clang_18-static_O3 |
timestamp | 2025-09-06 11:18:47 UTC (19:00:11 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-freebsd14.1 |
tgt config | freebsd_14-clang_18-O3 |
timestamp | 2025-09-06 11:18:13 UTC (19:00:45 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-freebsd14.1 |
tgt config | freebsd_14-clang_18 |
timestamp | 2025-09-06 11:17:32 UTC (19:01:27 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-apple-darwin23.5.0 |
tgt config | macos_14-clang_15.0-static_O3 |
timestamp | 2025-09-06 11:09:29 UTC (19:09:29 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-apple-darwin23.5.0 |
tgt config | macos_14-clang_15.0-O3 |
timestamp | 2025-09-06 11:08:42 UTC (19:10:16 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-apple-darwin23.5.0 |
tgt config | macos_14-clang_15.0 |
timestamp | 2025-09-06 11:07:55 UTC (19:11:03 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-apple-darwin23.5.0 |
tgt config | macos_14-gcc_14_homebrew-static_O3 |
timestamp | 2025-09-06 11:05:34 UTC (19:13:24 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-apple-darwin23.5.0 |
tgt config | macos_14-gcc_14_homebrew-O3 |
timestamp | 2025-09-06 11:04:42 UTC (19:14:16 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-apple-darwin23.5.0 |
tgt config | macos_14-gcc_14_homebrew |
timestamp | 2025-09-06 11:03:50 UTC (19:15:09 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_17_libc++ |
timestamp | 2025-09-06 10:38:08 UTC (19:40:50 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_17 |
timestamp | 2025-09-06 10:37:27 UTC (19:41:31 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-clang_15.0 |
timestamp | 2025-09-06 10:32:01 UTC (19:46:57 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_17_libc++ |
timestamp | 2025-09-06 10:25:50 UTC (19:53:08 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_17 |
timestamp | 2025-09-06 10:25:20 UTC (19:53:38 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_13 |
timestamp | 2025-09-06 10:23:50 UTC (19:55:09 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_13.1 |
timestamp | 2025-09-06 09:26:39 UTC (20:52:20 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-freebsd13.3 |
tgt config | freebsd_13-clang_17 |
timestamp | 2025-09-06 09:04:41 UTC (21:14:17 hours ago) |
result | success | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_18_llvm_msvc_17.10-static_O2 |
timestamp | 2025-09-06 09:02:54 UTC (21:16:04 hours ago) |
result | error (update) | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_18_llvm_msvc_17.10-O2 |
timestamp | 2025-09-06 09:02:00 UTC (21:16:58 hours ago) |
result | error (update) | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_18_llvm_msvc_17.10 |
timestamp | 2025-09-06 09:00:54 UTC (21:18:04 hours ago) |
result | error (update) | log | rebuild |
toolchain | stage-0.18.0-a.0.20250827065714.90c4b05593a7 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_17_msvc_msvc_17.10 |
timestamp | 2025-09-06 09:00:53 UTC (21:18:05 hours ago) |
result | error (update) | log | rebuild |
Changes
v1.5.5 (Apr 2023) fix: fix rare corruption bug affecting the high compression mode, reported by @danlark1 (#3517, @terrelln) perf: improve mid-level compression speed (#3529, #3533, #3543, @yoniko and #3552, @terrelln) lib: deprecated bufferless block-level API (#3534) by @terrelln cli: mmap large dictionaries to save memory, by @daniellerozenblit cli: improve speed of --patch-from mode (~+50%) (#3545) by @daniellerozenblit cli: improve i/o speed (~+10%) when processing lots of small files (#3479) by @felixhandte cli: zstd no longer crashes when requested to write into write-protected directory (#3541) by @felixhandte cli: fix decompression into block device using -o, reported by @georgmu (#3583) build: fix zstd CLI compiled with lzma support but not zlib support (#3494) by @Hello71 build: fix cmake does no longer require 3.18 as minimum version (#3510) by @kou build: fix MSVC+ClangCL linking issue (#3569) by @tru build: fix zstd-dll, version of zstd CLI that links to the dynamic library (#3496) by @yoniko build: fix MSVC warnings (#3495) by @embg doc: updated zstd specification to clarify corner cases, by @Cyan4973 doc: document how to create fat binaries for macos (#3568) by @rickmark misc: improve seekable format ingestion speed (~+100%) for very small chunk sizes (#3544) by @Cyan4973 misc: tests/fullbench can benchmark multiple files (#3516) by @dloidolt v1.5.4 (Feb 2023) perf: +20% faster huffman decompression for targets that can't compile x64 assembly (#3449, @terrelln) perf: up to +10% faster streaming compression at levels 1-2 (#3114, @embg) perf: +4-13% for levels 5-12 by optimizing function generation (#3295, @terrelln) pref: +3-11% compression speed for `arm` target (#3199, #3164, #3145, #3141, #3138, @JunHe77 and #3139, #3160, @danlark1) perf: +5-30% faster dictionary compression at levels 1-4 (#3086, #3114, #3152, @embg) perf: +10-20% cold dict compression speed by prefetching CDict tables (#3177, @embg) perf: +1% faster compression by removing a branch in ZSTD_fast_noDict (#3129, @felixhandte) perf: Small compression ratio improvements in high compression mode (#2983, #3391, @Cyan4973 and #3285, #3302, @daniellerozenblit) perf: small speed improvement by better detecting `STATIC_BMI2` for `clang` (#3080, @TocarIP) perf: Improved streaming performance when `ZSTD_c_stableInBuffer` is set (#2974, @Cyan4973) cli: Asynchronous I/O for improved cli speed (#2975, #2985, #3021, #3022, @yoniko) cli: Change `zstdless` behavior to align with `zless` (#2909, @binhdvo) cli: Keep original file if `-c` or `--stdout` is given (#3052, @dirkmueller) cli: Keep original files when result is concatenated into a single output with `-o` (#3450, @Cyan4973) cli: Preserve Permissions and Ownership of regular files (#3432, @felixhandte) cli: Print zlib/lz4/lzma library versions with `-vv` (#3030, @terrelln) cli: Print checksum value for single frame files with `-lv` (#3332, @Cyan4973) cli: Print `dictID` when present with `-lv` (#3184, @htnhan) cli: when `stderr` is *not* the console, disable status updates, but preserve final summary (#3458, @Cyan4973) cli: support `--best` and `--no-name` in `gzip` compatibility mode (#3059, @dirkmueller) cli: support for `posix` high resolution timer `clock_gettime()`, for improved benchmark accuracy (#3423, @Cyan4973) cli: improved help/usage (`-h`, `-H`) formatting (#3094, @dirkmueller and #3385, @jonpalmisc) cli: Fix better handling of bogus numeric values (#3268, @ctkhanhly) cli: Fix input consists of multiple files _and_ `stdin` (#3222, @yoniko) cli: Fix tiny files passthrough (#3215, @cgbur) cli: Fix for `-r` on empty directory (#3027, @brailovich) cli: Fix empty string as argument for `--output-dir-*` (#3220, @embg) cli: Fix decompression memory usage reported by `-vv --long` (#3042, @u1f35c, and #3232, @zengyijing) cli: Fix infinite loop when empty input is passed to trainer (#3081, @terrelln) cli: Fix `--adapt` doesn't work when `--no-progress` is also set (#3354, @terrelln) api: Support for Block-Level Sequence Producer (#3333, @embg) api: Support for in-place decompression (#3432, @terrelln) api: New `ZSTD_CCtx_setCParams()` function, set all parameters defined in a `ZSTD_compressionParameters` structure (#3403, @Cyan4973) api: Streaming decompression detects incorrect header ID sooner (#3175, @Cyan4973) api: Window size resizing optimization for edge case (#3345, @daniellerozenblit) api: More accurate error codes for busy-loop scenarios (#3413, #3455, @Cyan4973) api: Fix limit overflow in `compressBound` and `decompressBound` (#3362, #3373, Cyan4973) reported by @nigeltao api: Deprecate several advanced experimental functions: streaming (#3408, @embg), copy (#3196, @mileshu) bug: Fix corruption that rarely occurs in 32-bit mode with wlog=25 (#3361, @terrelln) bug: Fix for block-splitter (#3033, @Cyan4973) bug: Fixes for Sequence Compression API (#3023, #3040, @Cyan4973) bug: Fix leaking thread handles on Windows (#3147, @animalize) bug: Fix timing issues with cmake/meson... More