···11+v1.6.0 (Dec 2025)
22+api: legacy format support is now disabled by default
33+build: `ZSTD_LEGACY_SUPPORT` defaults to `0` in Makefile and CMake
44+15V1.5.7 (Feb 2025)
26fix: compression bug in 32-bit mode associated with long-lasting sessions
37api: new method `ZSTD_compressSequencesAndLiterals()` (#4217, #4232)
···1212- `make` : generates both static and dynamic libraries
1313- `make install` : install libraries, headers and pkg-config in local system directories
14141515-`libzstd` default scope is extensive, including compression, decompression, dictionary builder,
1616-and support for decoding legacy formats >= v0.5.0 by default.
1515+`libzstd` default scope includes compression, decompression, and dictionary builder.
1616+Note: starting v1.6.0, support for decoding legacy formats is disabled by default.
1717+See _modular build_ below to learn how to enable it.
1718The scope can be reduced on demand (see paragraph _modular build_).
18191920#### Multiarch Support
···99100 Specifying a number limits versions supported to that version onward.
100101 For example, `ZSTD_LEGACY_SUPPORT=2` means : "support legacy formats >= v0.2.0".
101102 Conversely, `ZSTD_LEGACY_SUPPORT=0` means "do __not__ support legacy formats".
102102- By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=5`.
103103+ By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=0` (disabled).
103104 Decoding supported legacy format is a transparent capability triggered within decompression functions.
104105 It's also allowed to invoke legacy API directly, exposed in `lib/legacy/zstd_legacy.h`.
105106 Each version does also provide its own set of advanced API.
+2-6
vendor/git/zstd-c/lib/libzstd.mk
···2828# configures a bunch of other variables to space-optimized defaults.
2929ZSTD_LIB_MINIFY ?= 0
30303131-# Legacy support
3232-ifneq ($(ZSTD_LIB_MINIFY), 0)
3333- ZSTD_LEGACY_SUPPORT ?= 0
3434-else
3535- ZSTD_LEGACY_SUPPORT ?= 5
3636-endif
3131+# Legacy support disabled by default
3232+ZSTD_LEGACY_SUPPORT ?= 0
3733ZSTD_LEGACY_MULTITHREADED_API ?= 0
38343935# Build size optimizations
···2020# zstreamtest32: Same as zstreamtest, but forced to compile in 32-bits mode
2121# ##########################################################################
22222323-ZSTD_LEGACY_SUPPORT ?= 5
2323+ZSTD_LEGACY_SUPPORT ?= 0
2424export ZSTD_LEGACY_SUPPORT
25252626DEBUGLEVEL ?= 2
···259259 shutil.copy2('dictBuilder', '{}/dictBuilder.{}'.format(tmp_dir, tag))
260260 os.chdir(r_dir + '/programs') # /path/to/zstd/tests/versionsTest/<TAG>/programs
261261 make(['clean'], False) # separate 'clean' target to allow parallel build
262262- make(['zstd'], False)
262262+ # Enable legacy support for cross-version compatibility testing.
263263+ # Use ZSTD_LEGACY_SUPPORT=1 for v0.6.x due to a bug where headers
264264+ # check for ==1 but code checks for >=1.
265265+ # Use ZSTD_LEGACY_SUPPORT=5 for v1.2.0+ because =1 includes old
266266+ # legacy files (v01-v04) that have missing includes in newer versions.
267267+ if tag < 'v1.2.0':
268268+ make(['zstd', 'ZSTD_LEGACY_SUPPORT=1'], False)
269269+ else:
270270+ make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False)
263271 else:
264272 os.chdir(programs_dir)
265273 print('-----------------------------------------------')
266274 print('compiling head')
267275 print('-----------------------------------------------')
268268- make(['zstd'], False)
276276+ # Enable legacy support for head to test cross-version compatibility
277277+ # (legacy support is disabled by default since v1.6.0)
278278+ make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False)
269279 shutil.copy2('zstd', dst_zstd)
270280271281 # remove any remaining *.zst and *.dec from previous test