@@ -4655,7 +4655,7 @@ unsafe fn ZSTD_buildSequencesStatistics(
46554655 } ;
46564656 stats. lastCountSize = 0 ;
46574657 stats. longOffsets = ZSTD_seqToCodes ( seqStorePtr) ;
4658- let mut max = MaxLL as core :: ffi :: c_uint ;
4658+ let mut max = MaxLL ;
46594659 let mostFrequent = HIST_countFast_wksp (
46604660 countWorkspace,
46614661 & mut max,
@@ -4671,7 +4671,7 @@ unsafe fn ZSTD_buildSequencesStatistics(
46714671 max,
46724672 mostFrequent,
46734673 nbSeq,
4674- LLFSELog as core :: ffi :: c_uint ,
4674+ LLFSELog ,
46754675 ( ( * prevEntropy) . litlengthCTable ) . as_ptr ( ) ,
46764676 LL_defaultNorm . as_ptr ( ) ,
46774677 LL_defaultNormLog ,
@@ -4682,15 +4682,15 @@ unsafe fn ZSTD_buildSequencesStatistics(
46824682 op as * mut core:: ffi:: c_void ,
46834683 oend. offset_from_unsigned ( op) ,
46844684 CTable_LitLength ,
4685- LLFSELog as u32 ,
4685+ LLFSELog ,
46864686 stats. LLtype as SymbolEncodingType_e ,
46874687 countWorkspace,
46884688 max,
46894689 llCodeTable,
46904690 nbSeq,
46914691 LL_defaultNorm . as_ptr ( ) ,
46924692 LL_defaultNormLog ,
4693- MaxLL as u32 ,
4693+ MaxLL ,
46944694 ( ( * prevEntropy) . litlengthCTable ) . as_ptr ( ) ,
46954695 :: core:: mem:: size_of :: < [ FSE_CTable ; 329 ] > ( ) ,
46964696 entropyWorkspace,
@@ -4704,7 +4704,7 @@ unsafe fn ZSTD_buildSequencesStatistics(
47044704 stats. lastCountSize = countSize;
47054705 }
47064706 op = op. add ( countSize) ;
4707- let mut max_0 = MaxOff as core :: ffi :: c_uint ;
4707+ let mut max_0 = MaxOff ;
47084708 let mostFrequent_0 = HIST_countFast_wksp (
47094709 countWorkspace,
47104710 & mut max_0,
@@ -4713,7 +4713,7 @@ unsafe fn ZSTD_buildSequencesStatistics(
47134713 entropyWorkspace,
47144714 entropyWkspSize,
47154715 ) ;
4716- let defaultPolicy = ( if max_0 <= DefaultMaxOff as core :: ffi :: c_uint {
4716+ let defaultPolicy = ( if max_0 <= DefaultMaxOff {
47174717 ZSTD_defaultAllowed as core:: ffi:: c_int
47184718 } else {
47194719 ZSTD_defaultDisallowed as core:: ffi:: c_int
@@ -4725,7 +4725,7 @@ unsafe fn ZSTD_buildSequencesStatistics(
47254725 max_0,
47264726 mostFrequent_0,
47274727 nbSeq,
4728- OffFSELog as core :: ffi :: c_uint ,
4728+ OffFSELog ,
47294729 ( ( * prevEntropy) . offcodeCTable ) . as_ptr ( ) ,
47304730 OF_defaultNorm . as_ptr ( ) ,
47314731 OF_defaultNormLog ,
@@ -4736,15 +4736,15 @@ unsafe fn ZSTD_buildSequencesStatistics(
47364736 op as * mut core:: ffi:: c_void ,
47374737 oend. offset_from_unsigned ( op) ,
47384738 CTable_OffsetBits ,
4739- OffFSELog as u32 ,
4739+ OffFSELog ,
47404740 stats. Offtype as SymbolEncodingType_e ,
47414741 countWorkspace,
47424742 max_0,
47434743 ofCodeTable,
47444744 nbSeq,
47454745 OF_defaultNorm . as_ptr ( ) ,
47464746 OF_defaultNormLog ,
4747- DefaultMaxOff as u32 ,
4747+ DefaultMaxOff ,
47484748 ( ( * prevEntropy) . offcodeCTable ) . as_ptr ( ) ,
47494749 :: core:: mem:: size_of :: < [ FSE_CTable ; 193 ] > ( ) ,
47504750 entropyWorkspace,
@@ -4758,7 +4758,7 @@ unsafe fn ZSTD_buildSequencesStatistics(
47584758 stats. lastCountSize = countSize_0;
47594759 }
47604760 op = op. add ( countSize_0) ;
4761- let mut max_1 = MaxML as core :: ffi :: c_uint ;
4761+ let mut max_1 = MaxML ;
47624762 let mostFrequent_1 = HIST_countFast_wksp (
47634763 countWorkspace,
47644764 & mut max_1,
@@ -4774,7 +4774,7 @@ unsafe fn ZSTD_buildSequencesStatistics(
47744774 max_1,
47754775 mostFrequent_1,
47764776 nbSeq,
4777- MLFSELog as core :: ffi :: c_uint ,
4777+ MLFSELog ,
47784778 ( ( * prevEntropy) . matchlengthCTable ) . as_ptr ( ) ,
47794779 ML_defaultNorm . as_ptr ( ) ,
47804780 ML_defaultNormLog ,
@@ -4785,15 +4785,15 @@ unsafe fn ZSTD_buildSequencesStatistics(
47854785 op as * mut core:: ffi:: c_void ,
47864786 oend. offset_from_unsigned ( op) ,
47874787 CTable_MatchLength ,
4788- MLFSELog as u32 ,
4788+ MLFSELog ,
47894789 stats. MLtype as SymbolEncodingType_e ,
47904790 countWorkspace,
47914791 max_1,
47924792 mlCodeTable,
47934793 nbSeq,
47944794 ML_defaultNorm . as_ptr ( ) ,
47954795 ML_defaultNormLog ,
4796- MaxML as u32 ,
4796+ MaxML ,
47974797 ( ( * prevEntropy) . matchlengthCTable ) . as_ptr ( ) ,
47984798 :: core:: mem:: size_of :: < [ FSE_CTable ; 363 ] > ( ) ,
47994799 entropyWorkspace,
@@ -5659,7 +5659,7 @@ unsafe fn ZSTD_buildBlockEntropyStats_literals(
56595659 let nodeWksp = countWkspStart. add ( countWkspSize) ;
56605660 let nodeWkspSize = wkspEnd. offset_from_unsigned ( nodeWksp) ;
56615661 let mut maxSymbolValue = HUF_SYMBOLVALUE_MAX as core:: ffi:: c_uint ;
5662- let mut huffLog = LitHufLog as core :: ffi :: c_uint ;
5662+ let mut huffLog = LitHufLog ;
56635663 let mut repeat = ( * prevHuf) . repeatMode ;
56645664 libc:: memcpy (
56655665 nextHuf as * mut core:: ffi:: c_void ,
@@ -6020,38 +6020,38 @@ unsafe fn ZSTD_estimateBlockSize_sequences(
60206020 ( * fseMetadata) . ofType ,
60216021 ofCodeTable,
60226022 nbSeq,
6023- MaxOff as core :: ffi :: c_uint ,
6023+ MaxOff ,
60246024 ( ( * fseTables) . offcodeCTable ) . as_ptr ( ) ,
60256025 core:: ptr:: null ( ) ,
60266026 OF_defaultNorm . as_ptr ( ) ,
60276027 OF_defaultNormLog ,
6028- DefaultMaxOff as u32 ,
6028+ DefaultMaxOff ,
60296029 workspace,
60306030 wkspSize,
60316031 ) ) ;
60326032 cSeqSizeEstimate = cSeqSizeEstimate. wrapping_add ( ZSTD_estimateBlockSize_symbolType (
60336033 ( * fseMetadata) . llType ,
60346034 llCodeTable,
60356035 nbSeq,
6036- MaxLL as core :: ffi :: c_uint ,
6036+ MaxLL ,
60376037 ( ( * fseTables) . litlengthCTable ) . as_ptr ( ) ,
60386038 LL_bits . as_ptr ( ) ,
60396039 LL_defaultNorm . as_ptr ( ) ,
60406040 LL_defaultNormLog ,
6041- MaxLL as u32 ,
6041+ MaxLL ,
60426042 workspace,
60436043 wkspSize,
60446044 ) ) ;
60456045 cSeqSizeEstimate = cSeqSizeEstimate. wrapping_add ( ZSTD_estimateBlockSize_symbolType (
60466046 ( * fseMetadata) . mlType ,
60476047 mlCodeTable,
60486048 nbSeq,
6049- MaxML as core :: ffi :: c_uint ,
6049+ MaxML ,
60506050 ( ( * fseTables) . matchlengthCTable ) . as_ptr ( ) ,
60516051 ML_bits . as_ptr ( ) ,
60526052 ML_defaultNorm . as_ptr ( ) ,
60536053 ML_defaultNormLog ,
6054- MaxML as u32 ,
6054+ MaxML ,
60556055 workspace,
60566056 wkspSize,
60576057 ) ) ;
@@ -7343,7 +7343,7 @@ pub unsafe fn ZSTD_loadCEntropy(
73437343 dictSize : size_t ,
73447344) -> size_t {
73457345 let mut offcodeNCount: [ core:: ffi:: c_short ; 32 ] = [ 0 ; 32 ] ;
7346- let mut offcodeMaxValue = MaxOff as core :: ffi :: c_uint ;
7346+ let mut offcodeMaxValue = MaxOff ;
73477347 let mut dictPtr = dict as * const u8 ;
73487348 let dictEnd = dictPtr. add ( dictSize) ;
73497349 dictPtr = dictPtr. add ( 8 ) ;
@@ -7390,7 +7390,7 @@ pub unsafe fn ZSTD_loadCEntropy(
73907390 }
73917391 dictPtr = dictPtr. add ( offcodeHeaderSize) ;
73927392 let mut matchlengthNCount: [ core:: ffi:: c_short ; 53 ] = [ 0 ; 53 ] ;
7393- let mut matchlengthMaxValue = MaxML as core :: ffi :: c_uint ;
7393+ let mut matchlengthMaxValue = MaxML ;
73947394 let mut matchlengthLog: core:: ffi:: c_uint = 0 ;
73957395 let matchlengthHeaderSize = FSE_readNCount (
73967396 & mut matchlengthNCount,
@@ -7415,14 +7415,11 @@ pub unsafe fn ZSTD_loadCEntropy(
74157415 ) ) {
74167416 return Error :: dictionary_corrupted. to_error_code ( ) ;
74177417 }
7418- ( * bs) . entropy . fse . matchlength_repeatMode = ZSTD_dictNCountRepeat (
7419- matchlengthNCount. as_mut_ptr ( ) ,
7420- matchlengthMaxValue,
7421- MaxML as core:: ffi:: c_uint ,
7422- ) ;
7418+ ( * bs) . entropy . fse . matchlength_repeatMode =
7419+ ZSTD_dictNCountRepeat ( matchlengthNCount. as_mut_ptr ( ) , matchlengthMaxValue, MaxML ) ;
74237420 dictPtr = dictPtr. add ( matchlengthHeaderSize) ;
74247421 let mut litlengthNCount: [ core:: ffi:: c_short ; 36 ] = [ 0 ; 36 ] ;
7425- let mut litlengthMaxValue = MaxLL as core :: ffi :: c_uint ;
7422+ let mut litlengthMaxValue = MaxLL ;
74267423 let mut litlengthLog: core:: ffi:: c_uint = 0 ;
74277424 let litlengthHeaderSize = FSE_readNCount (
74287425 & mut litlengthNCount,
@@ -7447,11 +7444,8 @@ pub unsafe fn ZSTD_loadCEntropy(
74477444 ) ) {
74487445 return Error :: dictionary_corrupted. to_error_code ( ) ;
74497446 }
7450- ( * bs) . entropy . fse . litlength_repeatMode = ZSTD_dictNCountRepeat (
7451- litlengthNCount. as_mut_ptr ( ) ,
7452- litlengthMaxValue,
7453- MaxLL as core:: ffi:: c_uint ,
7454- ) ;
7447+ ( * bs) . entropy . fse . litlength_repeatMode =
7448+ ZSTD_dictNCountRepeat ( litlengthNCount. as_mut_ptr ( ) , litlengthMaxValue, MaxLL ) ;
74557449 dictPtr = dictPtr. add ( litlengthHeaderSize) ;
74567450 if dictPtr. add ( 12 ) > dictEnd {
74577451 return Error :: dictionary_corrupted. to_error_code ( ) ;
@@ -7461,7 +7455,7 @@ pub unsafe fn ZSTD_loadCEntropy(
74617455 * ( ( * bs) . rep ) . as_mut_ptr ( ) . add ( 2 ) = MEM_readLE32 ( dictPtr. add ( 8 ) as * const core:: ffi:: c_void ) ;
74627456 dictPtr = dictPtr. add ( 12 ) ;
74637457 let dictContentSize = dictEnd. offset_from_unsigned ( dictPtr) ;
7464- let mut offcodeMax = MaxOff as u32 ;
7458+ let mut offcodeMax = MaxOff ;
74657459 if dictContentSize
74667460 <= ( -( 1 as core:: ffi:: c_int ) as u32 )
74677461 . wrapping_sub ( ( 128 as core:: ffi:: c_int * ( ( 1 as core:: ffi:: c_int ) << 10 ) ) as u32 )
0 commit comments