Skip to content
18 changes: 9 additions & 9 deletions lib/compress/zstd_compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ pub struct ZSTD_MatchState_t {
pub chainTable: *mut u32,
pub forceNonContiguous: core::ffi::c_int,
pub dedicatedDictSearch: core::ffi::c_int,
pub opt: optState_t,
pub opt: OptState,
pub dictMatchState: *const ZSTD_MatchState_t,
pub cParams: ZSTD_compressionParameters,
pub ldmSeqStore: *const RawSeqStore_t,
Expand All @@ -234,7 +234,7 @@ pub struct rawSeq {
pub matchLength: u32,
}

#[derive(Copy, Clone)]
#[derive(Copy, Clone, Default)]
#[repr(C)]
pub struct ZSTD_optimal_t {
pub price: core::ffi::c_int,
Expand Down Expand Up @@ -724,13 +724,13 @@ use crate::lib::compress::huf_compress::{
HUF_validateCTable, HUF_writeCTable_wksp,
};
use crate::lib::compress::zstd_compress_internal::{
optState_t, BufferedPolicy, CParamMode, CompressionStage, DictMode, DictTableLoadMethod,
LongLengthType, SeqCollector, StreamStage, TableFillPurpose, ZSTD_BlockCompressor_f,
ZSTD_LLcode, ZSTD_MLcode, ZSTD_blockSplitCtx, ZSTD_blockState_t, ZSTD_entropyCTables_t,
ZSTD_fseCTables_t, ZSTD_getSequenceLength, ZSTD_hufCTables_t, ZSTD_localDict, ZSTD_match_t,
ZSTD_minGain, ZSTD_noCompressBlock, ZSTD_prefixDict, ZSTD_storeSeq, ZSTD_storeSeqOnly,
ZSTD_updateRep, HASH_READ_SIZE, REPCODE1_TO_OFFBASE, REPCODE3_TO_OFFBASE, ZSTD_CHUNKSIZE_MAX,
ZSTD_CURRENT_MAX, ZSTD_DUBT_UNSORTED_MARK, ZSTD_SHORT_CACHE_TAG_BITS, ZSTD_WINDOW_START_INDEX,
BufferedPolicy, CParamMode, CompressionStage, DictMode, DictTableLoadMethod, LongLengthType,
OptState, SeqCollector, StreamStage, TableFillPurpose, ZSTD_BlockCompressor_f, ZSTD_LLcode,
ZSTD_MLcode, ZSTD_blockSplitCtx, ZSTD_blockState_t, ZSTD_entropyCTables_t, ZSTD_fseCTables_t,
ZSTD_getSequenceLength, ZSTD_hufCTables_t, ZSTD_localDict, ZSTD_match_t, ZSTD_minGain,
ZSTD_noCompressBlock, ZSTD_prefixDict, ZSTD_storeSeq, ZSTD_storeSeqOnly, ZSTD_updateRep,
HASH_READ_SIZE, REPCODE1_TO_OFFBASE, REPCODE3_TO_OFFBASE, ZSTD_CHUNKSIZE_MAX, ZSTD_CURRENT_MAX,
ZSTD_DUBT_UNSORTED_MARK, ZSTD_SHORT_CACHE_TAG_BITS, ZSTD_WINDOW_START_INDEX,
};
use crate::lib::compress::zstd_compress_literals::ZSTD_compressLiterals;
use crate::lib::compress::zstd_compress_sequences::{
Expand Down
4 changes: 2 additions & 2 deletions lib/compress/zstd_compress_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ pub enum OptPrice {

#[repr(C)]
#[derive(Default)]
pub struct optState_t {
pub struct OptState {
pub litFreq: *mut [core::ffi::c_uint; MaxLit as usize + 1],
pub litLengthFreq: *mut [core::ffi::c_uint; MaxLL as usize + 1],
pub matchLengthFreq: *mut [core::ffi::c_uint; MaxML as usize + 1],
Expand All @@ -324,7 +324,7 @@ pub struct optState_t {

/// The statistics tables are reserved in the workspace by `ZSTD_reset_matchState`, and so
/// are only valid when the strategy is at least `ZSTD_btopt`.
impl optState_t {
impl OptState {
pub(crate) unsafe fn litFreq(&self) -> &[core::ffi::c_uint; MaxLit as usize + 1] {
&*self.litFreq
}
Expand Down
Loading
Loading