refactor(compress): expose LDM skip leaves from Rust

Keep the existing internal ZSTD_ldm_* ABI names while making the two
sequence-store skip operations direct Rust exports. Remove only the C
forwarding declarations and bodies; LDM state projection, configuration
constants, and block-compressor adapters remain in C.

Test Plan:
- clang -fsyntax-only on lib/compress/zstd_ldm.c
- git diff --check
- Full capped native/upstream suite pending after this commit
This commit is contained in:
2026-07-20 11:49:48 +02:00
parent db4ddda35b
commit e1d98eb8b6
2 changed files with 3 additions and 16 deletions
+3 -3
View File
@@ -903,7 +903,7 @@ unsafe fn skip_sequences(raw_seq_store: *mut RawSeqStore, mut src_size: usize, m
}
#[no_mangle]
pub unsafe extern "C" fn ZSTD_rust_ldm_skipSequences(
pub unsafe extern "C" fn ZSTD_ldm_skipSequences(
raw_seq_store: *mut c_void,
src_size: usize,
min_match: u32,
@@ -912,7 +912,7 @@ pub unsafe extern "C" fn ZSTD_rust_ldm_skipSequences(
}
#[no_mangle]
pub unsafe extern "C" fn ZSTD_rust_ldm_skipRawSeqStoreBytes(
pub unsafe extern "C" fn ZSTD_ldm_skipRawSeqStoreBytes(
raw_seq_store: *mut c_void,
nb_bytes: usize,
) {
@@ -978,7 +978,7 @@ pub unsafe extern "C" fn ZSTD_rust_ldm_blockCompress(
let last_literals = unsafe {
ZSTD_ldm_rust_compressLiterals(block_context, seq_store, reps, src, src_size)
};
unsafe { ZSTD_rust_ldm_skipRawSeqStoreBytes(raw_seq_store.cast::<c_void>(), src_size) };
unsafe { ZSTD_ldm_skipRawSeqStoreBytes(raw_seq_store.cast::<c_void>(), src_size) };
return last_literals;
}