Move the frozen v0.3 frame decoder, entropy tables, and streaming context state into a feature-gated Rust module. Keep the historical C translation unit as an ABI shim so existing C callers retain the opaque context and error-code contracts while v0.4 and newer decoders remain unchanged. Test Plan: - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo test --manifest-path rust/Cargo.toml --no-default-features --features legacy-v01,legacy-v02, legacy-v03 - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo test --manifest-path rust/Cargo.toml --no-default-features --features compression,decompression, dict-builder,legacy-v01,legacy-v02,legacy-v03 - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo clippy --manifest-path rust/Cargo.toml --all-targets --no-default-features --features compression,decompression,dict-builder,legacy-v01,legacy-v02,legacy-v03 -- -D warnings - make -B -C lib libzstd.a ZSTD_LEGACY_SUPPORT=3 V=1 - git diff --cached --check
21 lines
777 B
C
21 lines
777 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 or both licenses.
|
|
*/
|
|
|
|
#include <stddef.h> /* size_t */
|
|
#include "zstd_v03.h"
|
|
#include "../common/compiler.h"
|
|
#include "../common/error_private.h"
|
|
|
|
|
|
/* Implementation moved to Rust (rust/src/legacy/zstd_v03.rs).
|
|
* The frozen v0.3 decoder, including its embedded FSE/Huff0 snapshot and the
|
|
* ZSTDv03_Dctx streaming state, now lives entirely in Rust; C code only ever
|
|
* holds an opaque ZSTDv03_Dctx pointer. */
|