refactor(compress): expose sequence statistics leaves from Rust

The C definitions of ZSTD_get1BlockSummary() and ZSTD_resetSeqStore()
only forwarded their arguments to Rust, so they duplicated the ABI boundary
without contributing assertions, private-state adaptation, or C-only policy.
Make Rust provide the existing internal symbols directly and remove only the
corresponding C declarations and forwarding bodies. Keep crate-local aliases
for the current compressor-module imports; they are Rust name aliases and do
not add the former ABI symbols back. No other statistics leaf is included.

Test Plan:
- `ulimit -v 41943040; cc -Ilib -Ilib/common -Ilib/compress -Ilib/decompress -Ilib/dictBuilder -Ilib/legacy -Ilib/deprecated -Ilib/zstd -fsyntax-only lib/compress/zstd_compress.c` -- passed
- `ulimit -v 41943040; cargo +nightly fmt --manifest-path rust/Cargo.toml --all -- --check` -- passed
- `git diff --check` and `git diff --cached --check` -- passed
- No cargo builds, make commands, or tests run, per request
This commit is contained in:
2026-07-20 12:42:03 +02:00
parent b51b8f24d2
commit 6bff89163f
2 changed files with 12 additions and 19 deletions
-13
View File
@@ -2137,10 +2137,7 @@ void ZSTD_rust_confirmRepcodesAndEntropyTables(
ZSTD_compressedBlockState_t** nextCBlock);
void ZSTD_rust_storeLastLiterals(SeqStore_t* seqStorePtr,
const BYTE* anchor, size_t lastLLSize);
void ZSTD_rust_resetSeqStore(SeqStore_t* ssPtr);
void ZSTD_rust_validateSeqStore(const SeqStore_t* seqStore, U32 minMatch);
BlockSummary ZSTD_rust_get1BlockSummary(const ZSTD_Sequence* seqs,
size_t nbSeqs);
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,
@@ -5355,11 +5352,6 @@ ZSTD_BlockCompressor_f ZSTD_selectBlockCompressor(ZSTD_strategy strat, ZSTD_Para
return selectedCompressor;
}
void ZSTD_resetSeqStore(SeqStore_t* ssPtr)
{
ZSTD_rust_resetSeqStore(ssPtr);
}
static size_t ZSTD_rust_externalSequenceProducer_transfer(
void* context, ZSTD_SequencePosition* seqPos,
const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
@@ -8540,11 +8532,6 @@ ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx,
litCapacity, decompressedSize);
}
BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbSeqs)
{
return ZSTD_rust_get1BlockSummary(seqs, nbSeqs);
}
/*====== Finalize ======*/
static ZSTD_inBuffer inBuffer_forEndFlush(const ZSTD_CStream* zcs)