refactor(compress): expose dictionary entropy leaf from Rust
The dictionary entropy-header loader was already implemented in Rust, but C kept a private bridge declaration and retained `ZSTD_loadCEntropy` as a forwarding wrapper. Export the original ABI name from Rust and retain a crate-local `ZSTD_rust_loadCEntropy` alias for existing Rust callers. Remove only the bridge declaration and forwarding body; dictionary-content orchestration, callbacks, and private C layouts remain unchanged. Test Plan: - `cc -std=c99 -Ilib -Ilib/common -Ilib/compress -Ilib/decompress -Ilib/dict -fsyntax-only lib/compress/zstd_compress.c` -- passed. - `git diff --check` -- passed. - `cargo +nightly fmt --manifest-path rust/Cargo.toml --all -- --check` -- passed. - `git diff --cached --check` -- passed. - Cargo build/test, make, and other heavy checks were intentionally not run per the requested lightweight-only scope.
This commit is contained in:
@@ -2139,8 +2139,6 @@ void ZSTD_rust_storeLastLiterals(SeqStore_t* seqStorePtr,
|
||||
void ZSTD_rust_validateSeqStore(const SeqStore_t* seqStore, U32 minMatch);
|
||||
U32 ZSTD_rust_resolveRepcodeToRawOffset(const U32 rep[ZSTD_REP_NUM],
|
||||
U32 offBase, U32 ll0);
|
||||
size_t ZSTD_rust_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace,
|
||||
const void* dict, size_t dictSize);
|
||||
/* Rust owns dictionary-content orchestration and policy. The callbacks below
|
||||
* keep configuration-sensitive match-state, LDM, workspace, and matchfinder
|
||||
* operations private to C. */
|
||||
@@ -6231,14 +6229,6 @@ static void ZSTD_loadDictionaryContent_assertInvalidStrategy(void* opaque)
|
||||
}
|
||||
|
||||
|
||||
/* Dictionary entropy-header loading and content orchestration live in Rust;
|
||||
* this keeps the original internal symbol available to C callers. */
|
||||
size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace,
|
||||
const void* const dict, size_t dictSize)
|
||||
{
|
||||
return ZSTD_rust_loadCEntropy(bs, workspace, dict, dictSize);
|
||||
}
|
||||
|
||||
/* Package only scalar policy inputs and opaque private-operation callbacks for
|
||||
* the Rust dictionary-content orchestrator. */
|
||||
static size_t ZSTD_loadDictionaryContent_callback(
|
||||
|
||||
Reference in New Issue
Block a user