Files
zstd-rs/lib/legacy/zstd_v02.c
T
ddidderr 9b909aaef8 feat(legacy): port the v0.2 decoder to Rust
Translate the frozen v0.2 frame, entropy, block, frame-size, and streaming
decoder paths to Rust while preserving the opaque C context ABI. Replace the
3465-line historical C implementation with a declaration-only shim and enable
the Rust module for the legacy-v02 Cargo feature.

Test Plan:
- cargo test --manifest-path rust/Cargo.toml --no-default-features --features compression,decompression,dict-builder,legacy-v02
- make -B -C lib libzstd.a ZSTD_LEGACY_SUPPORT=2 V=1
- git diff --check

Refs: rust/src/legacy/zstd_v02.rs, lib/legacy/zstd_v02.c
2026-07-12 09:40:38 +02:00

22 lines
801 B
C

/*
* Copyright (c) Yann Collet, Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may select, at your option, one of the above-listed licenses.
*/
#include <stddef.h> /* size_t, ptrdiff_t */
#include "zstd_v02.h"
#include "../common/compiler.h"
#include "../common/error_private.h"
/* Implementation moved to Rust (rust/src/legacy/zstd_v02.rs).
* The frozen v0.2 decoder, including its embedded FSE/Huff0 snapshot and the
* ZSTDv02_Dctx streaming state, now lives entirely in Rust; C code only ever
* holds an opaque ZSTDv02_Dctx pointer. */