/* * ZSTD_DDict implementation moved to rust/src/zstd_ddict.rs. * * Keep this translation unit in the original source list so the C build keeps * the same header configuration while the Rust static library provides the * exported symbols. The metadata below is deliberately compiled with the C * decoder's exact conditional layout: Rust uses it to fill the opaque DCtx * fields without duplicating optional C layout choices such as DYNAMIC_BMI2. */ #define ZSTD_STATIC_LINKING_ONLY #include "zstd_decompress_internal.h" #include "zstd_ddict.h" const size_t ZSTD_rust_ddict_llt_ptr_offset = offsetof(struct ZSTD_DCtx_s, LLTptr); const size_t ZSTD_rust_ddict_mlt_ptr_offset = offsetof(struct ZSTD_DCtx_s, MLTptr); const size_t ZSTD_rust_ddict_oft_ptr_offset = offsetof(struct ZSTD_DCtx_s, OFTptr); const size_t ZSTD_rust_ddict_huf_ptr_offset = offsetof(struct ZSTD_DCtx_s, HUFptr); const size_t ZSTD_rust_ddict_entropy_rep_offset = offsetof(struct ZSTD_DCtx_s, entropy.rep); const size_t ZSTD_rust_ddict_previous_dst_end_offset = offsetof(struct ZSTD_DCtx_s, previousDstEnd); const size_t ZSTD_rust_ddict_prefix_start_offset = offsetof(struct ZSTD_DCtx_s, prefixStart); const size_t ZSTD_rust_ddict_virtual_start_offset = offsetof(struct ZSTD_DCtx_s, virtualStart); const size_t ZSTD_rust_ddict_dict_end_offset = offsetof(struct ZSTD_DCtx_s, dictEnd); const size_t ZSTD_rust_ddict_lit_entropy_offset = offsetof(struct ZSTD_DCtx_s, litEntropy); const size_t ZSTD_rust_ddict_fse_entropy_offset = offsetof(struct ZSTD_DCtx_s, fseEntropy); const size_t ZSTD_rust_ddict_dict_id_offset = offsetof(struct ZSTD_DCtx_s, dictID); #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION const size_t ZSTD_rust_ddict_fuzz_begin_offset = offsetof(struct ZSTD_DCtx_s, dictContentBeginForFuzzing); const size_t ZSTD_rust_ddict_fuzz_end_offset = offsetof(struct ZSTD_DCtx_s, dictContentEndForFuzzing); #else const size_t ZSTD_rust_ddict_fuzz_begin_offset = (size_t)-1; const size_t ZSTD_rust_ddict_fuzz_end_offset = (size_t)-1; #endif