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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user