Move the frozen v0.7 decoder, dictionary handling, bufferless streaming, and buffered streaming implementation into the Rust legacy module. Keep the historical C translation unit as a declaration-only ABI shim so the existing C callers and build selection remain unchanged. The port preserves the v0.7 entropy and frame boundaries, while fixing the Rust-side literal-tail bookkeeping and making buffered header loading revisit the complete frame header before sizing its rolling buffers. Test Plan: - cargo test --manifest-path rust/Cargo.toml --no-default-features --features decompression,legacy-v07 legacy::zstd_v07::tests - cargo clippy --manifest-path rust/Cargo.toml -- -D warnings - make -B -C programs zstd V=1 - decode a v0.7.5 fixture and compare its 200000-byte output - make -C tests check V=1
20 lines
799 B
C
20 lines
799 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_v07.h"
|
|
#include "../common/compiler.h"
|
|
#include "../common/error_private.h"
|
|
|
|
/* Implementation moved to Rust (rust/src/legacy/zstd_v07.rs).
|
|
* The frozen v0.7 decoder, including its embedded FSE/Huff0 snapshot, frame
|
|
* state, dictionary handling, and buffered streaming context, now lives in
|
|
* Rust; this translation unit remains a declaration-only ABI shim. */
|