Move the frozen v0.4 frame, entropy, streaming, and dictionary decoder implementation to Rust while retaining the C translation unit as an ABI anchor. Register the decoder behind the matching legacy feature and keep its historical behavior isolated from newer formats. Test Plan: - rustfmt +nightly --check --edition 2021 rust/src/legacy/zstd_v04.rs rust/src/legacy/mod.rs - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo test --manifest-path rust/Cargo.toml --no-default-features --features decompression,legacy-v04 legacy::zstd_v04 - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo clippy --manifest-path rust/Cargo.toml --all-targets --no-default-features --features decompression,legacy-v04 -- -D warnings - C/Rust v0.4 ABI and decompression build checks - git diff --cached --check
20 lines
800 B
C
20 lines
800 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_v04.h"
|
|
#include "../common/compiler.h"
|
|
#include "../common/error_private.h"
|
|
|
|
/* Implementation moved to Rust (rust/src/legacy/zstd_v04.rs).
|
|
* The frozen v0.4 decoder, including its embedded FSE/Huff0 snapshot, frame
|
|
* state, and buffered streaming context, now lives entirely in Rust; C code
|
|
* only ever holds opaque ZSTDv04_Dctx and ZBUFFv04_DCtx pointers. */
|