| 1 | mod decoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/decoder/; |
| 2 | mod encoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/encoder/; |
| 3 | mod range_codingrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/; |
| 4 | |
| 5 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{ |
| 6 | allocrust-analyzer cargo std https://github.com/rust-lang/rust/library/std alloc/::{alloc_zeroedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc alloc/alloc_zeroed()., deallocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc alloc/dealloc()., Layoutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core alloc/layout/Layout#}, |
| 7 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::{Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#, Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#}, |
| 8 | memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::{swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/swap()., ManuallyDroprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/manually_drop/ManuallyDrop#}, |
| 9 | ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#, |
| 10 | }; |
| 11 | |
| 12 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) use range_codingrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/::{RangeDecoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeDecoder#, RangeEncoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeEncoder#}; |
| 13 | |
| 14 | use superrust-analyzer cargo ppmd-rust 1.2.1 internal/::*; |
| 15 | use craterust-analyzer cargo ppmd-rust 1.2.1 crate/::{Errorrust-analyzer cargo ppmd-rust 1.2.1 Error#, RestoreMethodrust-analyzer cargo ppmd-rust 1.2.1 RestoreMethod#, PPMD8_MAX_ORDERrust-analyzer cargo ppmd-rust 1.2.1 PPMD8_MAX_ORDER.}; |
| 16 | |
| 17 | const MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ.: u8 = 124; |
| 18 | const UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE.: isize = 12; |
| 19 | const K_TOP_VALUErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/K_TOP_VALUE.: u32 = 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().24; |
| 20 | const K_BOT_VALUErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/K_BOT_VALUE.: u32 = 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().15; |
| 21 | const EMPTY_NODErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/EMPTY_NODE.: u32 = u32::MAXrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]MAX.; |
| 22 | const FLAG_RESCALEDrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_RESCALED.: u8 = 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().2; |
| 23 | const FLAG_PREV_HIGHrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_PREV_HIGH.: u8 = 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().4; |
| 24 | |
| 25 | static K_EXP_ESCAPErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/K_EXP_ESCAPE.: [u8; 16] = [25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2]; |
| 26 | |
| 27 | static K_INIT_BIN_ESCrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/K_INIT_BIN_ESC.: [u16; 8] = [ |
| 28 | 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051, |
| 29 | ]; |
| 30 | |
| 31 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 32 | #[repr(C)] |
| 33 | struct Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node# { |
| 34 | stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp.: u32, |
| 35 | nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next.: TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#, |
| 36 | nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu.: u32, |
| 37 | } |
| 38 | |
| 39 | impl Pointeerust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/Pointee# for Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node# { |
| 40 | const TAGrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[Node][Pointee]TAG.: u32 = TAG_NODErust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TAG_NODE.; |
| 41 | } |
| 42 | |
| 43 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 44 | #[repr(C)] |
| 45 | struct Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context# { |
| 46 | num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats.: u8, |
| 47 | flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags.: u8, |
| 48 | union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2.: Union2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#, |
| 49 | union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4.: Union4rust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#, |
| 50 | suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.: TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#, |
| 51 | } |
| 52 | |
| 53 | impl Pointeerust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/Pointee# for Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context# { |
| 54 | const TAGrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[Context][Pointee]TAG.: u32 = TAG_CONTEXTrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TAG_CONTEXT.; |
| 55 | } |
| 56 | |
| 57 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) struct PPMd8rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#<RC> { |
| 58 | min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>, |
| 59 | max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>, |
| 60 | found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>, |
| 61 | order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall.: u32, |
| 62 | init_escrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_esc.: u32, |
| 63 | prev_successrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#prev_success.: u32, |
| 64 | max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order.: u32, |
| 65 | restore_methodrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#restore_method.: RestoreMethodrust-analyzer cargo ppmd-rust 1.2.1 RestoreMethod#, |
| 66 | run_lengthrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#run_length.: i32, |
| 67 | init_rlrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_rl.: i32, |
| 68 | sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size.: u32, |
| 69 | glue_countrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#glue_count.: u32, |
| 70 | align_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#align_offset.: u32, |
| 71 | lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>, |
| 72 | hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>, |
| 73 | textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>, |
| 74 | units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>, |
| 75 | index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.: [u8; 40], |
| 76 | units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.: [u8; 128], |
| 77 | free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.: [TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#; 38], |
| 78 | stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.: [u32; 38], |
| 79 | ns2bs_indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2bs_index.: [u8; 256], |
| 80 | ns2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2index.: [u8; 260], |
| 81 | exp_escaperust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#exp_escape.: [u8; 16], |
| 82 | dummy_seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#dummy_see.: Seerust-analyzer cargo ppmd-rust 1.2.1 internal/See#, |
| 83 | seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#see.: [[Seerust-analyzer cargo ppmd-rust 1.2.1 internal/See#; 32]; 24], |
| 84 | bin_summrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#bin_summ.: [[u16; 64]; 25], |
| 85 | memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>, |
| 86 | memory_layoutrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_layout.: Layoutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core alloc/layout/Layout#, |
| 87 | rcrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#rc.: RC, |
| 88 | } |
| 89 | |
| 90 | impl<RC> Droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/drop/Drop# for PPMd8rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#<RC> { |
| 91 | fn droprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`][Drop]drop().(&mut self) { |
| 92 | unsafe { |
| 93 | deallocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc alloc/dealloc().(self.memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr..as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), self.memory_layoutrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_layout.); |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | impl<RC> MemoryAllocatorrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/MemoryAllocator# for PPMd8rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#<RC> { |
| 99 | fn base_memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`][MemoryAllocator]base_memory_ptr().(&self) -> NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8> { |
| 100 | self.memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr. |
| 101 | } |
| 102 | |
| 103 | #[cfg(not(feature = "unstable-tagged-offsets"))] |
| 104 | fn units_start(&self) -> NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8> { |
| 105 | selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/.units_start |
| 106 | } |
| 107 | |
| 108 | #[cfg(feature = "unstable-tagged-offsets")] |
| 109 | fn sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`][MemoryAllocator]size().(&self) -> u32 { |
| 110 | self.sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size. |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | impl<RC> PPMd8rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#<RC> { |
| 115 | fn constructrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]construct().( |
| 116 | rc: RC, |
| 117 | max_order: u32, |
| 118 | mem_size: u32, |
| 119 | restore_method: RestoreMethodrust-analyzer cargo ppmd-rust 1.2.1 RestoreMethod#, |
| 120 | ) -> craterust-analyzer cargo ppmd-rust 1.2.1 crate/::Resultrust-analyzer cargo ppmd-rust 1.2.1 Result#<Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]> { |
| 121 | let mut units2index = [0u8; 128]; |
| 122 | let mut index2units = [0u8; 40]; |
| 123 | |
| 124 | let mut k = 0; |
| 125 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#PPMD_NUM_INDEXESrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_NUM_INDEXES. { |
| 126 | let mut step = if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().12 { 4 } else { (i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1 }; |
| 127 | loop { |
| 128 | units2index[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().k as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = i as u8; |
| 129 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 130 | |
| 131 | step rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 132 | if step rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 133 | break; |
| 134 | } |
| 135 | } |
| 136 | index2units[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = k as u8; |
| 137 | } |
| 138 | |
| 139 | let mut ns2bs_index = [0u8; 256]; |
| 140 | ns2bs_index[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = (0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().1) as u8; |
| 141 | ns2bs_index[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = (1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().1) as u8; |
| 142 | ns2bs_index[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().2..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#11]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut()..fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().((2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().1) as u8); |
| 143 | ns2bs_index[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().11..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#256]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut()..fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().((3 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().1) as u8); |
| 144 | |
| 145 | let mut ns2index = [0u8; 260]; |
| 146 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#5 { |
| 147 | ns2index[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = i as u8; |
| 148 | } |
| 149 | |
| 150 | let mut m = 5; |
| 151 | let mut k = 1; |
| 152 | for i in 5..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#260 { |
| 153 | ns2index[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = m as u8; |
| 154 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 155 | if k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 156 | m rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 157 | k = m rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().4; |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | let align_offset = (4u32.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(mem_size)) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().3; |
| 162 | let total_size = (align_offset rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().mem_size) as usize; |
| 163 | |
| 164 | let memory_layout = Layoutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core alloc/layout/Layout#::from_size_alignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core alloc/layout/impl#[Layout]from_size_align().(total_size, align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<usize>()) |
| 165 | .expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("Failed to create memory layout"); |
| 166 | |
| 167 | let allocation = unsafe { |
| 168 | assert_nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_ne!!(total_size, 0); |
| 169 | NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]new().(alloc_zeroedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc alloc/alloc_zeroed().(memory_layout)) |
| 170 | }; |
| 171 | |
| 172 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(memory_ptr) = allocation else { |
| 173 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ppmd-rust 1.2.1 Error#::MemoryAllocationrust-analyzer cargo ppmd-rust 1.2.1 Error#MemoryAllocation#); |
| 174 | }; |
| 175 | |
| 176 | let mut ppmd = Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`] { |
| 177 | min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::danglingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]dangling().(), |
| 178 | max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::danglingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]dangling().(), |
| 179 | found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::danglingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]dangling().(), |
| 180 | order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall.: 0, |
| 181 | init_escrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_esc.: 0, |
| 182 | prev_successrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#prev_success.: 0, |
| 183 | max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order., |
| 184 | restore_methodrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#restore_method., |
| 185 | run_lengthrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#run_length.: 0, |
| 186 | init_rlrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_rl.: 0, |
| 187 | sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size.: mem_size, |
| 188 | glue_countrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#glue_count.: 0, |
| 189 | align_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#align_offset., |
| 190 | lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::danglingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]dangling().(), |
| 191 | hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::danglingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]dangling().(), |
| 192 | textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::danglingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]dangling().(), |
| 193 | units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start.: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::danglingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]dangling().(), |
| 194 | index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units., |
| 195 | units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index., |
| 196 | free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.: [TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); 38], |
| 197 | stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.: [0; 38], |
| 198 | ns2bs_indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2bs_index., |
| 199 | ns2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2index., |
| 200 | exp_escaperust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#exp_escape.: K_EXP_ESCAPErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/K_EXP_ESCAPE., |
| 201 | dummy_seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#dummy_see.: Seerust-analyzer cargo ppmd-rust 1.2.1 internal/See#::defaultrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[See][Default]default().(), |
| 202 | seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#see.: [[Seerust-analyzer cargo ppmd-rust 1.2.1 internal/See#::defaultrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[See][Default]default().(); 32]; 24], |
| 203 | bin_summrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#bin_summ.: [[0; 64]; 25], |
| 204 | memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr., |
| 205 | memory_layoutrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_layout., |
| 206 | rcrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#rc., |
| 207 | }; |
| 208 | |
| 209 | unsafe { ppmd.restart_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restart_model().() }; |
| 210 | |
| 211 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(ppmd) |
| 212 | } |
| 213 | |
| 214 | unsafe fn offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().<T: Pointeerust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/Pointee#>(&self, ptr: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<T>) -> TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset# { |
| 215 | unsafe { TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::from_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]from_ptr().(self, ptr) } |
| 216 | } |
| 217 | |
| 218 | unsafe fn insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(&mut self, mut node: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#>, index: u32) { |
| 219 | unsafe { |
| 220 | node.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp. = 0xFFFFFFFF; |
| 221 | node.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next. = self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 222 | node.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu. = self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 223 | self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(node); |
| 224 | self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(1); |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | unsafe fn remove_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]remove_node().(&mut self, index: u32) -> NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#> { |
| 229 | let index = index as usize; |
| 230 | let node_offset = self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 231 | let node = node_offset.as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().::<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#, _>(self); |
| 232 | self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().index]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next.; |
| 233 | self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().index]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(1); |
| 234 | node |
| 235 | } |
| 236 | |
| 237 | unsafe fn split_blockrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]split_block().(&mut self, mut ptr: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>, old_index: u32, new_index: u32) { |
| 238 | unsafe { |
| 239 | let nu = self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().old_index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32 |
| 240 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().new_index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 241 | ptr = ptr.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().new_index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as isize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE.); |
| 242 | let mut index = self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 243 | if self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().nu { |
| 244 | index rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 245 | let k = self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 246 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().( |
| 247 | ptr.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().((k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as u32) as isize).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), |
| 248 | nu.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(k).wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(1), |
| 249 | ); |
| 250 | } |
| 251 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), index); |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /// We use the first u16 field of the 12-bytes as record type stamp. |
| 256 | /// State { symbol: u8, freq: u8, .. : freq != 0 |
| 257 | /// Context { num_stats: u16, .. : num_stats != 0 |
| 258 | /// Node { stamp: u16 : stamp == 0 for free record |
| 259 | /// : stamp == 1 for head record and guard |
| 260 | /// Last 12-bytes record in array is always containing the 12-bytes order-0 Context |
| 261 | /// record. |
| 262 | unsafe fn glue_free_blocksrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]glue_free_blocks().(&mut self) { |
| 263 | unsafe { |
| 264 | let mut n = TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); |
| 265 | |
| 266 | self.glue_countrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#glue_count. = (1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().13) as u32; |
| 267 | self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps. = [0; 38]; |
| 268 | |
| 269 | // We set guard NODE at lo_unit. |
| 270 | if self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit. { |
| 271 | self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#>().as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp. = 0; |
| 272 | } |
| 273 | |
| 274 | self.glue_blocksrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]glue_blocks().(&mut n); |
| 275 | self.fill_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]fill_list().(n); |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | /// Glue free blocks. |
| 280 | unsafe fn glue_blocksrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]glue_blocks().(&mut self, n: *mut TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#) { |
| 281 | unsafe { |
| 282 | let mut prev = n; |
| 283 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#PPMD_NUM_INDEXESrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_NUM_INDEXES. { |
| 284 | let mut next = self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 285 | self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); |
| 286 | while next.is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 287 | let mut node = next.as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().::<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#, _>(self); |
| 288 | let mut nu = node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu.; |
| 289 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().prev = next; |
| 290 | next = node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next.; |
| 291 | if nu rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 { |
| 292 | prev = &raw mut node.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next.; |
| 293 | loop { |
| 294 | let node2 = node.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(nu as isize).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(); |
| 295 | if node2.stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().EMPTY_NODErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/EMPTY_NODE. { |
| 296 | break; |
| 297 | } |
| 298 | nu rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().node2.nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu.; |
| 299 | (*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().node.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().()).nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu. = nu; |
| 300 | node2.nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu. = 0; |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().prev = TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | /// Fill lists of free blocks. |
| 310 | unsafe fn fill_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]fill_list().(&mut self, mut n: TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#) { |
| 311 | unsafe { |
| 312 | while n.is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 313 | let mut node = n.as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().::<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#, _>(self); |
| 314 | let mut nu = node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu.; |
| 315 | n = node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next.; |
| 316 | if nu rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 317 | continue; |
| 318 | } |
| 319 | while nu rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().128 { |
| 320 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(node.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), PPMD_NUM_INDEXESrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_NUM_INDEXES. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1); |
| 321 | nu rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().128; |
| 322 | node = node.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(128); |
| 323 | } |
| 324 | let mut index = self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 325 | if self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().nu { |
| 326 | index rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 327 | let k = self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 328 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().( |
| 329 | node.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(k as isize).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), |
| 330 | nu.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(k).wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(1), |
| 331 | ); |
| 332 | } |
| 333 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(node.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), index); |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | #[inline(never)] |
| 339 | unsafe fn alloc_units_rarerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]alloc_units_rare().(&mut self, index: u32) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>> { |
| 340 | unsafe { |
| 341 | if self.glue_countrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#glue_count. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 342 | self.glue_free_blocksrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]glue_free_blocks().(); |
| 343 | if self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 344 | return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.remove_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]remove_node().(index).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().()); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | let mut i = index; |
| 349 | |
| 350 | loop { |
| 351 | i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 352 | if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().PPMD_NUM_INDEXESrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_NUM_INDEXES. { |
| 353 | let num_bytes = self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as u32; |
| 354 | let us = self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start.; |
| 355 | self.glue_countrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#glue_count. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 356 | return if us.offset_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset_from().(self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text.) as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().num_bytes { |
| 357 | self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. = us.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().(num_bytes as isize)); |
| 358 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start.) |
| 359 | } else { |
| 360 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# |
| 361 | }; |
| 362 | } |
| 363 | if self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 364 | break; |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | let block = self.remove_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]remove_node().(i).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(); |
| 369 | self.split_blockrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]split_block().(block, i, index); |
| 370 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(block) |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | unsafe fn alloc_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]alloc_units().(&mut self, index: u32) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>> { |
| 375 | unsafe { |
| 376 | if self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 377 | return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.remove_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]remove_node().(index).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().()); |
| 378 | } |
| 379 | let num_bytes = self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as u32; |
| 380 | let lo = self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit.; |
| 381 | if self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit..offset_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset_from().(lo) as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().num_bytes { |
| 382 | self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit. = lo.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(num_bytes as isize); |
| 383 | return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(lo); |
| 384 | } |
| 385 | self.alloc_units_rarerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]alloc_units_rare().(index) |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | unsafe fn shrink_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]shrink_units().( |
| 390 | &mut self, |
| 391 | old_ptr: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>, |
| 392 | old_nu: u32, |
| 393 | new_nu: u32, |
| 394 | ) -> NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8> { |
| 395 | unsafe { |
| 396 | let old_ptr = old_ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(); |
| 397 | |
| 398 | let i0 = self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(old_nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 399 | let i1 = self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(new_nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 400 | |
| 401 | if i0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().i1 { |
| 402 | return old_ptr; |
| 403 | } |
| 404 | |
| 405 | if self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 406 | let ptr = self.remove_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]remove_node().(i1).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(); |
| 407 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/copy().( |
| 408 | old_ptr.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 409 | ptr.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 410 | new_nu as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as usize, |
| 411 | ); |
| 412 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(old_ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), i0); |
| 413 | return ptr; |
| 414 | } |
| 415 | |
| 416 | self.split_blockrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]split_block().(old_ptr, i0, i1); |
| 417 | |
| 418 | old_ptr |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | unsafe fn free_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]free_units().(&mut self, ptr: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>, nu: u32) { |
| 423 | unsafe { |
| 424 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32); |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | unsafe fn special_free_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]special_free_unit().(&mut self, ptr: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<u8>) { |
| 429 | unsafe { |
| 430 | if ptr rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. { |
| 431 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), 0); |
| 432 | } else { |
| 433 | self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. = self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE.); |
| 434 | }; |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | unsafe fn expand_text_arearust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]expand_text_area().(&mut self) { |
| 439 | unsafe { |
| 440 | let mut count: [u32; 38] = [0; 38]; |
| 441 | |
| 442 | if self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit. { |
| 443 | self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#>().as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp. = 0; |
| 444 | } |
| 445 | |
| 446 | let mut node = self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#>(); |
| 447 | while node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().EMPTY_NODErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/EMPTY_NODE. { |
| 448 | let nu = node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().nurust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#nu.; |
| 449 | node.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp. = 0; |
| 450 | count[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 451 | node = node.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(nu as isize); |
| 452 | } |
| 453 | self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. = node.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(); |
| 454 | |
| 455 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#PPMD_NUM_INDEXESrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_NUM_INDEXES. { |
| 456 | let mut cnt = count[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 457 | if cnt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 { |
| 458 | let mut prev = &raw mut self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().; |
| 459 | let mut n = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().prev; |
| 460 | self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(cnt); |
| 461 | loop { |
| 462 | let mut node = n.as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().::<Noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#, _>(self); |
| 463 | n = node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next.; |
| 464 | if node.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().stamprust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#stamp. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 { |
| 465 | prev = &raw mut node.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().nextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Node#next.; |
| 466 | continue; |
| 467 | } |
| 468 | |
| 469 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().prev = n; |
| 470 | cnt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 471 | if cnt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 472 | break; |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | #[inline(never)] |
| 481 | unsafe fn restart_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restart_model().(&mut self) { |
| 482 | unsafe { |
| 483 | self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list. = [TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); 38]; |
| 484 | self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps. = [0; 38]; |
| 485 | |
| 486 | self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text. = self.memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(self.align_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#align_offset. as isize); |
| 487 | self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit. = self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(self.sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size. as isize); |
| 488 | self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. = self |
| 489 | .hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit. |
| 490 | .offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().(self.sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size. as isize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().7 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE.)); |
| 491 | self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit. = self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start.; |
| 492 | self.glue_countrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#glue_count. = 0; |
| 493 | |
| 494 | self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. = self.max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order.; |
| 495 | self.init_rlrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_rl. = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().(if self.max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().12 { |
| 496 | self.max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order. as i32 |
| 497 | } else { |
| 498 | 12 |
| 499 | }) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 500 | self.run_lengthrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#run_length. = self.init_rlrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_rl.; |
| 501 | self.prev_successrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#prev_success. = 0; |
| 502 | |
| 503 | self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit. = self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE.); |
| 504 | let mut mc = self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>(); |
| 505 | let s = self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>(); |
| 506 | |
| 507 | self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit. = self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().((256 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Div<Self>`]div().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE.); |
| 508 | self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context. = mc; |
| 509 | self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context. = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.; |
| 510 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. = s; |
| 511 | |
| 512 | { |
| 513 | let mc = mc.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(); |
| 514 | mc.flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. = 0; |
| 515 | mc.num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. = (256 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1) as u8; |
| 516 | mc.union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = (256 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1) as u16; |
| 517 | mc.union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats. = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(s); |
| 518 | mc.suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix. = TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); |
| 519 | } |
| 520 | |
| 521 | (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#256).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|i| { |
| 522 | let s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(i).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(); |
| 523 | s.symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. = i as u8; |
| 524 | s.freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = 1; |
| 525 | s.set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().()); |
| 526 | }); |
| 527 | |
| 528 | let mut i = 0; |
| 529 | (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#25).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|m| { |
| 530 | while self.ns2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().m { |
| 531 | i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 532 | } |
| 533 | |
| 534 | (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#8).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|k| { |
| 535 | let val = PPMD_BIN_SCALErust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_BIN_SCALE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().(K_INIT_BIN_ESCrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/K_INIT_BIN_ESC.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().k]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div().(i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1); |
| 536 | |
| 537 | (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#64).step_byrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#step_by().(8).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|r| { |
| 538 | self.bin_summrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#bin_summ.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().m]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().r]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = val as u16; |
| 539 | }); |
| 540 | }); |
| 541 | }); |
| 542 | |
| 543 | let mut i = 0; |
| 544 | (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#24).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|m| { |
| 545 | while self.ns2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().3) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().m rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().3 { |
| 546 | i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 547 | } |
| 548 | |
| 549 | let summ = (2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().5) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<u32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<u32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<u32>`]shl().(PPMD_PERIOD_BITSrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_PERIOD_BITS. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().4); |
| 550 | |
| 551 | (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#32).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|k| { |
| 552 | let see = &mut self.seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#see.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().m]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().k]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().; |
| 553 | see.summrust-analyzer cargo ppmd-rust 1.2.1 internal/See#summ. = summ as u16; |
| 554 | see.shiftrust-analyzer cargo ppmd-rust 1.2.1 internal/See#shift. = (PPMD_PERIOD_BITSrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_PERIOD_BITS. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().4) as u8; |
| 555 | see.countrust-analyzer cargo ppmd-rust 1.2.1 internal/See#count. = 7; |
| 556 | }); |
| 557 | }); |
| 558 | |
| 559 | self.dummy_seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#dummy_see..summrust-analyzer cargo ppmd-rust 1.2.1 internal/See#summ. = 0; // unused |
| 560 | self.dummy_seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#dummy_see..shiftrust-analyzer cargo ppmd-rust 1.2.1 internal/See#shift. = PPMD_PERIOD_BITSrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_PERIOD_BITS. as u8; |
| 561 | self.dummy_seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#dummy_see..countrust-analyzer cargo ppmd-rust 1.2.1 internal/See#count. = 64; // unused |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | /// This function is called when we remove some symbols (successors) in context. |
| 566 | /// It increases escape_freq for sum of all removed symbols. |
| 567 | unsafe fn refreshrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]refresh().(&mut self, mut ctx: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>, old_nu: u32, mut scale: u32) { |
| 568 | unsafe { |
| 569 | let num_stats = ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32; |
| 570 | |
| 571 | let states = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(ctx); |
| 572 | let mut s = self |
| 573 | .shrink_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]shrink_units().(states.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), old_nu, (num_stats rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1) |
| 574 | .castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>(); |
| 575 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats. = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(s); |
| 576 | |
| 577 | scale rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().(ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().15) as u32; |
| 578 | |
| 579 | let mut flags = Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_preparerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_prepare().(s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as u32); |
| 580 | let mut freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 581 | let mut esc_freq = (ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().freq; |
| 582 | freq = freq.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(scale) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr().scale; |
| 583 | let mut sum_freq = freq; |
| 584 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 585 | |
| 586 | let mut i = num_stats; |
| 587 | |
| 588 | loop { |
| 589 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 590 | let mut freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 591 | esc_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().freq; |
| 592 | freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().scale rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr().scale; |
| 593 | sum_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().freq; |
| 594 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 595 | flags rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_preparerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_prepare().(s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as u32); |
| 596 | |
| 597 | i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 598 | if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 599 | break; |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = (sum_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().((esc_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().scale) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<Self>`]shr().scale)) as u16; |
| 604 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. = (ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. as u32 |
| 605 | &rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().((FLAG_PREV_HIGHrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_PREV_HIGH. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().FLAG_RESCALEDrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_RESCALED. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().scale) |
| 606 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_convert_3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_convert_3().(flags))) as u8; |
| 607 | } |
| 608 | } |
| 609 | |
| 610 | /// Reduces contexts. |
| 611 | /// |
| 612 | /// It converts successors at max_order to another contexts to NULL-successors. |
| 613 | /// It removes RAW-successors and NULL-successors that are not Order-0, and it |
| 614 | /// removes contexts when it has no successors. If the (multi_state.stats) is |
| 615 | /// close to (units_start), it moves it up. |
| 616 | unsafe fn cut_offrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]cut_off().(&mut self, mut ctx: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>, order: u32) -> TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset# { |
| 617 | unsafe { |
| 618 | let mut ns = ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32; |
| 619 | |
| 620 | if ns rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 621 | let mut successor = ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..state4rust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#state4..get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State4]get_successor().(); |
| 622 | if successor.is_real_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_real_context().(self) { |
| 623 | if order rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().self.max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order. { |
| 624 | let context = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(successor); |
| 625 | successor = self.cut_offrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]cut_off().(context, order rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1); |
| 626 | } else { |
| 627 | successor = TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); |
| 628 | } |
| 629 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..state4rust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#state4..set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State4]set_successor().(successor); |
| 630 | if successor.is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() || order rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().9 { |
| 631 | // O_BOUND |
| 632 | return self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(ctx); |
| 633 | } |
| 634 | } |
| 635 | self.special_free_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]special_free_unit().(ctx.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().()); |
| 636 | return TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); |
| 637 | } |
| 638 | |
| 639 | let nu = (ns as u32).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1; |
| 640 | |
| 641 | let index = self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 642 | let stats_offset = ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats.; |
| 643 | let mut stats = stats_offset.as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().::<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#, _>(self); |
| 644 | |
| 645 | if stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<u8>().offset_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset_from().(self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[isize][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[isize][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[isize][`PartialOrd<Self>`]le().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[isize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[isize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[isize][`Shl<i32>`]shl().14) |
| 646 | && stats_offset.get_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]get_offset().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..get_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]get_offset().() |
| 647 | { |
| 648 | let ptr = self.remove_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]remove_node().(index); |
| 649 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats. = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>()); |
| 650 | |
| 651 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/copy().( |
| 652 | stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().().as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 653 | ptr.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 654 | nu as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as usize, |
| 655 | ); |
| 656 | |
| 657 | if stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. { |
| 658 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), index); |
| 659 | } else { |
| 660 | self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. = self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().( |
| 661 | (self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as u32) as isize, |
| 662 | ); |
| 663 | } |
| 664 | stats = ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(); |
| 665 | } |
| 666 | |
| 667 | let mut s = stats.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(ns as isize); |
| 668 | |
| 669 | loop { |
| 670 | let successor = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().(); |
| 671 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().successor.is_real_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_real_context().(self) { |
| 672 | let fresh = ns; |
| 673 | ns rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 674 | let mut s2 = stats.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(fresh as isize); |
| 675 | if order rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 { |
| 676 | if s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().s2 { |
| 677 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().s2.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 678 | } |
| 679 | } else { |
| 680 | swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/swap().(s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(), s2.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().()); |
| 681 | s2.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().()); |
| 682 | } |
| 683 | } else if order rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().self.max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order. { |
| 684 | let context = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(successor); |
| 685 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(self.cut_offrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]cut_off().(context, order rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1)); |
| 686 | } else { |
| 687 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().()); |
| 688 | } |
| 689 | |
| 690 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1); |
| 691 | if s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().stats { |
| 692 | break; |
| 693 | } |
| 694 | } |
| 695 | |
| 696 | if ns rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32 && order rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 { |
| 697 | if ns rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { |
| 698 | self.free_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]free_units().(stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), nu); |
| 699 | self.special_free_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]special_free_unit().(ctx.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().()); |
| 700 | return TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().(); |
| 701 | } |
| 702 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. = ns as u8; |
| 703 | if ns rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 704 | let sym = stats.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol.; |
| 705 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. = (((ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().FLAG_PREV_HIGHrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_PREV_HIGH.) as u32) |
| 706 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_flag3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag3().(sym as u32)) |
| 707 | as u8; |
| 708 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#symbol. = sym; |
| 709 | ctx.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#freq. = |
| 710 | (((stats.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().11) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().3) as u8; |
| 711 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(stats.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().()); |
| 712 | self.free_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]free_units().(stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), nu); |
| 713 | } else { |
| 714 | self.refreshrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]refresh().( |
| 715 | ctx, |
| 716 | nu, |
| 717 | (ctx.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().16 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().(ns as u32)) as u32, |
| 718 | ); |
| 719 | } |
| 720 | } |
| 721 | |
| 722 | self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(ctx) |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | unsafe fn get_used_memoryrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_used_memory().(&self) -> u32 { |
| 727 | unsafe { |
| 728 | let mut v = 0; |
| 729 | |
| 730 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#PPMD_NUM_INDEXESrust-analyzer cargo ppmd-rust 1.2.1 internal/PPMD_NUM_INDEXES. { |
| 731 | v rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`MulAssign<Self>`]mul_assign().*=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`MulAssign<Self>`]mul_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`MulAssign<Self>`]mul_assign().self.stampsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#stamps.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().self.index2unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#index2units.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 732 | } |
| 733 | |
| 734 | self.sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size. |
| 735 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().(self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit..offset_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset_from().(self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit.) as u32) |
| 736 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().(self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start..offset_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset_from().(self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text.) as u32) |
| 737 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().(v rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as u32) |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | unsafe fn restore_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restore_model().(&mut self, ctx_error: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>) { |
| 742 | unsafe { |
| 743 | self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text. = self.memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(self.align_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#align_offset. as isize); |
| 744 | |
| 745 | // We go here in cases of error of allocation for context (c1) |
| 746 | // Order(min_context) < Order(ctx_error) <= Order(max_context) |
| 747 | |
| 748 | let mut s; |
| 749 | let mut c = self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context.; |
| 750 | |
| 751 | // We remove last symbol from each of contexts [p.max_context ... ctx_error) contexts. |
| 752 | // So we roll back all created (symbols) before the error. |
| 753 | while c rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().ctx_error { |
| 754 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`SubAssign<Self>`]sub_assign().1; |
| 755 | if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 756 | s = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(c); |
| 757 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. = (((c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().FLAG_PREV_HIGHrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_PREV_HIGH.) as u32) |
| 758 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_flag3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag3().(s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as u32)) |
| 759 | as u8; |
| 760 | |
| 761 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#symbol. = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol.; |
| 762 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#symbol. = (((s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().11) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().3) as u8; |
| 763 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() |
| 764 | .union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4. |
| 765 | .state4rust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#state4. |
| 766 | .set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State4]set_successor().(s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().()); |
| 767 | |
| 768 | self.special_free_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]special_free_unit().(s.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().()); |
| 769 | } else { |
| 770 | // refresh() can increase escape_freq on value of freq of last symbol, |
| 771 | // that was added before error. So the largest possible increase for escape_freq |
| 772 | // is (8) from value before model_update() |
| 773 | self.refreshrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]refresh().(c, ((c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().3) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1, 0); |
| 774 | } |
| 775 | |
| 776 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 777 | } |
| 778 | |
| 779 | // Increase escape_freq for context [ctx_error..p.MinContext) |
| 780 | while c rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context. { |
| 781 | if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 782 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#freq. = |
| 783 | ((c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#freq. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1) as u8; |
| 784 | } else { |
| 785 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = (c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().4) as u16; |
| 786 | if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().128 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32 { |
| 787 | self.refreshrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]refresh().(c, (c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1, 1); |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 792 | } |
| 793 | |
| 794 | if self.restore_methodrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#restore_method. rust-analyzer cargo ppmd-rust 1.2.1 impl#[RestoreMethod][`PartialEq<Self>`]eq().==rust-analyzer cargo ppmd-rust 1.2.1 impl#[RestoreMethod][`PartialEq<Self>`]eq(). rust-analyzer cargo ppmd-rust 1.2.1 impl#[RestoreMethod][`PartialEq<Self>`]eq().RestoreMethodrust-analyzer cargo ppmd-rust 1.2.1 RestoreMethod#::Restartrust-analyzer cargo ppmd-rust 1.2.1 RestoreMethod#Restart# |
| 795 | || self.get_used_memoryrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_used_memory().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().self.sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1 |
| 796 | { |
| 797 | self.restart_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restart_model().(); |
| 798 | } else { |
| 799 | while self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 800 | self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context. = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 801 | } |
| 802 | loop { |
| 803 | self.cut_offrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]cut_off().(self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context., 0); |
| 804 | self.expand_text_arearust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]expand_text_area().(); |
| 805 | |
| 806 | if self.get_used_memoryrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_used_memory().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().3 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().(self.sizerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#size. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().2) { |
| 807 | break; |
| 808 | } |
| 809 | } |
| 810 | self.glue_countrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#glue_count. = 0; |
| 811 | self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. = self.max_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_order.; |
| 812 | } |
| 813 | self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context. = self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context.; |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | #[inline(never)] |
| 818 | unsafe fn create_successorsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]create_successors().( |
| 819 | &mut self, |
| 820 | skip: i32, |
| 821 | s1: &mut Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>>, |
| 822 | mut c: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>, |
| 823 | ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>> { |
| 824 | unsafe { |
| 825 | let up_branch = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().(); |
| 826 | let mut num_ps = 0u32; |
| 827 | // Fixed over Shkarin's code. Maybe it could work without + 1 too. |
| 828 | let mut ps: [Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>>; PPMD8_MAX_ORDERrust-analyzer cargo ppmd-rust 1.2.1 PPMD8_MAX_ORDER. as usize + 1] = |
| 829 | [Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; PPMD8_MAX_ORDERrust-analyzer cargo ppmd-rust 1.2.1 PPMD8_MAX_ORDER. as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]; |
| 830 | |
| 831 | if skip rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 832 | let fresh = num_ps; |
| 833 | num_ps rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 834 | ps[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().fresh as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.); |
| 835 | } |
| 836 | |
| 837 | while c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 838 | let mut s; |
| 839 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 840 | |
| 841 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(state) = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s1 { |
| 842 | s = state; |
| 843 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s1 = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 844 | } else if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().0 { |
| 845 | let sym = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol.; |
| 846 | s = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(c); |
| 847 | |
| 848 | while s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().sym as i32 { |
| 849 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 850 | } |
| 851 | |
| 852 | if (s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().9 { |
| 853 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().1; |
| 854 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().1; |
| 855 | } |
| 856 | } else { |
| 857 | s = self.get_single_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_single_state().(c); |
| 858 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = (s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32 |
| 859 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().((self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0) as u32 |
| 860 | &rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().((s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().24) as u32)) |
| 861 | as u8; |
| 862 | } |
| 863 | |
| 864 | let successor = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().(); |
| 865 | if successor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().up_branch { |
| 866 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(successor); |
| 867 | if num_ps rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 868 | return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(c); |
| 869 | } |
| 870 | break; |
| 871 | } else { |
| 872 | let fresh = num_ps; |
| 873 | num_ps = num_ps.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(1); |
| 874 | ps[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().fresh as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(s); |
| 875 | } |
| 876 | } |
| 877 | |
| 878 | let new_sym = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().up_branch.as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().::<u8, _>(self).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 879 | let new_offset = up_branch.get_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]get_offset().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1; |
| 880 | let up_branch = TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::from_bytes_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]from_bytes_offset().(new_offset); |
| 881 | |
| 882 | let flags = (Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_flag4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag4().(self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as u32) |
| 883 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_flag3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag3().(new_sym as u32)) as u8; |
| 884 | |
| 885 | let new_freq = if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 886 | c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#freq. |
| 887 | } else { |
| 888 | let mut s = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(c); |
| 889 | while s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().new_sym as i32 { |
| 890 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 891 | } |
| 892 | let cf = (s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1; |
| 893 | let s0 = c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().cf; |
| 894 | 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Add<Self>`]add().(if 2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().s0 { |
| 895 | (5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().s0) as u32 |
| 896 | } else { |
| 897 | (cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().s0) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().3) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div().s0 |
| 898 | }) as u8 |
| 899 | }; |
| 900 | |
| 901 | loop { |
| 902 | let mut c1: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#> = if self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.lo_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#lo_unit. { |
| 903 | self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit. = self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE.); |
| 904 | self.hi_unitrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#hi_unit..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().() |
| 905 | } else if self.free_listrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#free_list.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 906 | self.remove_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]remove_node().(0).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().() |
| 907 | } else { |
| 908 | self.alloc_units_rarerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]alloc_units_rare().(0)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch()..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().() |
| 909 | }; |
| 910 | |
| 911 | { |
| 912 | let c1_mut = c1.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(); |
| 913 | c1_mut.flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. = flags; |
| 914 | c1_mut.num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. = 0; |
| 915 | c1_mut.union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#symbol. = new_sym; |
| 916 | c1_mut.union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#freq. = new_freq; |
| 917 | } |
| 918 | |
| 919 | self.get_single_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_single_state().(c1).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(up_branch); |
| 920 | |
| 921 | c1.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix. = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(c); |
| 922 | num_ps = num_ps.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(1); |
| 923 | |
| 924 | let mut state = ps[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().num_ps as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("successor not set"); |
| 925 | state |
| 926 | .as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() |
| 927 | .set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(c1.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>())); |
| 928 | |
| 929 | c = c1; |
| 930 | if num_ps rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 931 | break; |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(c) |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | unsafe fn reduce_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]reduce_order().( |
| 940 | &mut self, |
| 941 | mut s1: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>>, |
| 942 | mut c: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>, |
| 943 | ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>> { |
| 944 | unsafe { |
| 945 | let mut s; |
| 946 | let c1 = c; |
| 947 | let up_branch = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().::<u8>(self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text..castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().()); |
| 948 | |
| 949 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(up_branch); |
| 950 | self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 951 | |
| 952 | loop { |
| 953 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(state) = s1 { |
| 954 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 955 | s = state; |
| 956 | s1 = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 957 | } else { |
| 958 | if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix..is_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_null().() { |
| 959 | return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(c); |
| 960 | } |
| 961 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 962 | if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 { |
| 963 | s = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(c); |
| 964 | if s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as i32 { |
| 965 | loop { |
| 966 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 967 | |
| 968 | if s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as i32 |
| 969 | ==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as i32 |
| 970 | { |
| 971 | break; |
| 972 | } |
| 973 | } |
| 974 | } |
| 975 | if (s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().9 { |
| 976 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = (s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().2) as u8; |
| 977 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = |
| 978 | (c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().2) as u16; |
| 979 | } |
| 980 | } else { |
| 981 | s = self.get_single_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_single_state().(c); |
| 982 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = |
| 983 | (s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().((s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as i32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().32) as i32) as u8; |
| 984 | } |
| 985 | } |
| 986 | if s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().().is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 987 | break; |
| 988 | } |
| 989 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(up_branch); |
| 990 | self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 991 | } |
| 992 | |
| 993 | if s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().().get_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]get_offset().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]le().up_branch.get_offsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]get_offset().() { |
| 994 | let s2 = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.; |
| 995 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. = s; |
| 996 | match self.create_successorsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]create_successors().(0, &mut Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, c) { |
| 997 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => { |
| 998 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().()); |
| 999 | } |
| 1000 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(successor) => { |
| 1001 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(successor)); |
| 1002 | } |
| 1003 | } |
| 1004 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. = s2; |
| 1005 | } |
| 1006 | |
| 1007 | let successor = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().(); |
| 1008 | if self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().1 && c1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`][`PartialEq<Self>`]eq().self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context. { |
| 1009 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(successor); |
| 1010 | self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text. = self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text..offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1); |
| 1011 | } |
| 1012 | if successor.is_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_null().() { |
| 1013 | return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 1014 | } |
| 1015 | |
| 1016 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(successor)) |
| 1017 | } |
| 1018 | } |
| 1019 | |
| 1020 | #[inline(never)] |
| 1021 | unsafe fn update_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]update_model().(&mut self) { |
| 1022 | unsafe { |
| 1023 | let mut max_successor; |
| 1024 | let mut min_successor = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().(); |
| 1025 | let mut c; |
| 1026 | let f_freq = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 1027 | let f_symbol = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol.; |
| 1028 | let mut s: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>> = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 1029 | |
| 1030 | if (self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div().4 |
| 1031 | && self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix..is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() |
| 1032 | { |
| 1033 | // Update frequencies in suffix Context |
| 1034 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 1035 | if c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 1036 | let mut state = self.get_single_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_single_state().(c); |
| 1037 | if (state.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as i32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().32 { |
| 1038 | state.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().1; |
| 1039 | } |
| 1040 | s = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(state); |
| 1041 | } else { |
| 1042 | let sym = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol.; |
| 1043 | let mut state = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(c); |
| 1044 | |
| 1045 | if state.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().sym { |
| 1046 | while state.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().sym { |
| 1047 | state = state.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 1048 | } |
| 1049 | if state.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(0).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as i32 |
| 1050 | >=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().state.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as i32 |
| 1051 | { |
| 1052 | swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/swap().(state.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(0).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(), state.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().()); |
| 1053 | state = state.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1); |
| 1054 | } |
| 1055 | } |
| 1056 | |
| 1057 | if (state.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().9 { |
| 1058 | state.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = (state.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().2) as u8; |
| 1059 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = |
| 1060 | (c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().2) as u16; |
| 1061 | } |
| 1062 | |
| 1063 | s = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(state); |
| 1064 | } |
| 1065 | } |
| 1066 | |
| 1067 | c = self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context.; |
| 1068 | if self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 && min_successor.is_not_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_not_null().() { |
| 1069 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cs) = self.create_successorsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]create_successors().(1, &mut s, self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.) else { |
| 1070 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. |
| 1071 | .as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() |
| 1072 | .set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#::nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]null().()); |
| 1073 | self.restore_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restore_model().(c); |
| 1074 | return; |
| 1075 | }; |
| 1076 | |
| 1077 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. |
| 1078 | .as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() |
| 1079 | .set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(cs)); |
| 1080 | self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context. = cs; |
| 1081 | self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context. = self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context.; |
| 1082 | return; |
| 1083 | } |
| 1084 | |
| 1085 | let mut text = self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text.; |
| 1086 | let mut fresh = text; |
| 1087 | text = text.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 1088 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().fresh.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol.; |
| 1089 | self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text. = text; |
| 1090 | if text rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge().self.units_startrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units_start. { |
| 1091 | self.restore_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restore_model().(c); |
| 1092 | return; |
| 1093 | } |
| 1094 | max_successor = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().::<u8>(text.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().()); |
| 1095 | |
| 1096 | if min_successor.is_nullrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_null().() { |
| 1097 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cs) = self.reduce_orderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]reduce_order().(s, self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.) else { |
| 1098 | self.restore_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restore_model().(c); |
| 1099 | return; |
| 1100 | }; |
| 1101 | min_successor = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(cs); |
| 1102 | } else if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().min_successor.is_real_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_real_context().(self) { |
| 1103 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cs) = self.create_successorsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]create_successors().(0, &mut s, self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.) else { |
| 1104 | self.restore_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restore_model().(c); |
| 1105 | return; |
| 1106 | }; |
| 1107 | min_successor = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(cs); |
| 1108 | } |
| 1109 | |
| 1110 | self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 1111 | if self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 1112 | max_successor = min_successor; |
| 1113 | self.textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text. = self |
| 1114 | .textrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#text. |
| 1115 | .offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().((self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.) as isize)); |
| 1116 | } |
| 1117 | |
| 1118 | let flag = Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_flag3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag3().(f_symbol as u32) as u8; |
| 1119 | let ns = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32; |
| 1120 | let s0 = (self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().ns rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().f_freq; |
| 1121 | |
| 1122 | while c rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context. { |
| 1123 | let mut sum; |
| 1124 | let ns1 = c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32; |
| 1125 | if ns1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 { |
| 1126 | if ns1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 { |
| 1127 | // Expand for one UNIT |
| 1128 | let old_nu = (ns1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1; |
| 1129 | let i = self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(old_nu as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32; |
| 1130 | if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().old_nu as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32 { |
| 1131 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ptr) = self.alloc_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]alloc_units().(i.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(1)) else { |
| 1132 | self.restore_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restore_model().(c); |
| 1133 | return; |
| 1134 | }; |
| 1135 | let old_ptr = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(c); |
| 1136 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/copy().( |
| 1137 | old_ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().().as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 1138 | ptr.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 1139 | old_nu as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().UNIT_SIZErust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/UNIT_SIZE. as usize, |
| 1140 | ); |
| 1141 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(old_ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), i); |
| 1142 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats. = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>()); |
| 1143 | } |
| 1144 | } |
| 1145 | sum = c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32; |
| 1146 | // max increase of escape_freq is 1 here. |
| 1147 | // An average increase is 1/3 per symbol |
| 1148 | sum = sum.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(((3 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().ns1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().ns) as u32); |
| 1149 | } else { |
| 1150 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(s_ptr) = self.alloc_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]alloc_units().(0) else { |
| 1151 | self.restore_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]restore_model().(c); |
| 1152 | return; |
| 1153 | }; |
| 1154 | let mut s = s_ptr.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>(); |
| 1155 | |
| 1156 | let mut freq = c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#freq. as u32; |
| 1157 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. = c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..state2rust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#state2..symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State2#symbol.; |
| 1158 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() |
| 1159 | .set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..state4rust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#state4..get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State4]get_successor().()); |
| 1160 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats. = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(s); |
| 1161 | |
| 1162 | if freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().(MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Div<Self>`]div().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1) as u32 { |
| 1163 | freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`ShlAssign<i32>`]shl_assign().<<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`ShlAssign<i32>`]shl_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`ShlAssign<i32>`]shl_assign().1; |
| 1164 | } else { |
| 1165 | freq = (MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().4) as u32; |
| 1166 | } |
| 1167 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 1168 | |
| 1169 | sum = freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().self.init_escrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_esc. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(ns rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().2) as u32; |
| 1170 | } |
| 1171 | |
| 1172 | let mut s = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(c).offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(ns1 as isize).offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 1173 | let mut cf = 2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().sum.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(6) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().f_freq; |
| 1174 | let sf = s0.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(sum); |
| 1175 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. = f_symbol; |
| 1176 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. = ns1.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(1) as u8; |
| 1177 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().set_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]set_successor().(max_successor); |
| 1178 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. = c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOr<Self>`]bitor().flag; |
| 1179 | if cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().6 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().sf { |
| 1180 | cf = 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().sf) as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().sf) as u32; |
| 1181 | sum = sum.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(4); |
| 1182 | // It can add (1, 2, 3) to escape_freq |
| 1183 | } else { |
| 1184 | cf = |
| 1185 | 4u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().9 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().sf) as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().12 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().sf) as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(cf rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().15 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().sf) as u32; |
| 1186 | sum = sum.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(cf); |
| 1187 | } |
| 1188 | |
| 1189 | c.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = sum as u16; |
| 1190 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = cf as u8; |
| 1191 | c = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(c.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 1192 | } |
| 1193 | |
| 1194 | self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context. = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(min_successor); |
| 1195 | self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context. = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.; |
| 1196 | } |
| 1197 | } |
| 1198 | |
| 1199 | #[inline(never)] |
| 1200 | unsafe fn rescalerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]rescale().(&mut self) { |
| 1201 | let stats = self.get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.); |
| 1202 | let mut s = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.; |
| 1203 | |
| 1204 | // Sort the list by freq |
| 1205 | if s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().stats { |
| 1206 | let tmp = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 1207 | loop { |
| 1208 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(0).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 1209 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1); |
| 1210 | if s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`][`PartialEq<Self>`]eq().stats { |
| 1211 | break; |
| 1212 | } |
| 1213 | } |
| 1214 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() = tmp; |
| 1215 | } |
| 1216 | |
| 1217 | let mut sum_freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 1218 | let mut esc_freq = (self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().sum_freq; |
| 1219 | |
| 1220 | let adder = (self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0) as u32; |
| 1221 | |
| 1222 | sum_freq = (sum_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(adder)) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1; |
| 1223 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = sum_freq as u8; |
| 1224 | |
| 1225 | let mut i = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32; |
| 1226 | |
| 1227 | loop { |
| 1228 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1); |
| 1229 | let mut freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 1230 | esc_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().freq; |
| 1231 | freq = freq.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(adder) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1; |
| 1232 | sum_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().freq; |
| 1233 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 1234 | |
| 1235 | if freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32 { |
| 1236 | let tmp = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 1237 | let mut s1 = s; |
| 1238 | loop { |
| 1239 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s1.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(0).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().s1.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 1240 | s1 = s1.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1); |
| 1241 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(s1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().stats && freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().s1.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32) { |
| 1242 | break; |
| 1243 | } |
| 1244 | } |
| 1245 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s1.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() = tmp; |
| 1246 | } |
| 1247 | i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`SubAssign<Self>`]sub_assign().1; |
| 1248 | if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 1249 | break; |
| 1250 | } |
| 1251 | } |
| 1252 | |
| 1253 | if s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 { |
| 1254 | // Remove all items with freq == 0 |
| 1255 | let mut i = 0; |
| 1256 | loop { |
| 1257 | i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 1258 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1); |
| 1259 | if s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 { |
| 1260 | break; |
| 1261 | } |
| 1262 | } |
| 1263 | |
| 1264 | esc_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().i; |
| 1265 | let mut mc = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.; |
| 1266 | let num_stats = mc.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32; |
| 1267 | let num_stats_new = num_stats rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().i; |
| 1268 | mc.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. = num_stats_new as u8; |
| 1269 | let n0 = (num_stats rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1; |
| 1270 | |
| 1271 | if num_stats_new rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 1272 | let mut freq = (2u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().(stats.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32)).div_ceilrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]div_ceil().(esc_freq); |
| 1273 | if freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().(MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div().3) as u32 { |
| 1274 | freq = (MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Div<Self>`]div().3) as u32; |
| 1275 | } |
| 1276 | mc.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. = (((mc.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().FLAG_PREV_HIGHrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_PREV_HIGH.) as u32) |
| 1277 | +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_flag3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag3().(stats.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as u32)) |
| 1278 | as u8; |
| 1279 | |
| 1280 | s = self.get_single_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_single_state().(mc); |
| 1281 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().() = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().stats.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 1282 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 1283 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. = s; |
| 1284 | self.insert_noderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]insert_node().(stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), self.units2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#units2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(n0 as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32); |
| 1285 | return; |
| 1286 | } |
| 1287 | |
| 1288 | let n1 = (num_stats_new rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1; |
| 1289 | if n0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().n1 { |
| 1290 | let shrunk = self.shrink_unitsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]shrink_units().(stats.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().(), n0, n1); |
| 1291 | mc.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats. = self.offset_for_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]offset_for_ptr().(shrunk.castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().::<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>()); |
| 1292 | } |
| 1293 | } |
| 1294 | |
| 1295 | let mc = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(); |
| 1296 | mc.union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = sum_freq.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(esc_freq).wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(esc_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1) as u16; |
| 1297 | mc.flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().FLAG_RESCALEDrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/FLAG_RESCALED.; |
| 1298 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. = mc.union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats..as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().(self); |
| 1299 | } |
| 1300 | |
| 1301 | unsafe fn make_esc_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]make_esc_freq().(&mut self, num_masked: u32, esc_freq: &mut u32) -> SeeSourcerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource# { |
| 1302 | unsafe { |
| 1303 | let num_stats = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32; |
| 1304 | |
| 1305 | if num_stats rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0xFF { |
| 1306 | let (base_context_idx, see_table_hash) = |
| 1307 | self.calculate_see_table_hashrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]calculate_see_table_hash().(num_masked, num_stats); |
| 1308 | |
| 1309 | let see = &mut self.seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#see.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().base_context_idx]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().see_table_hash]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().; |
| 1310 | |
| 1311 | // If (see.summ) field is larger than 16-bit, we need only low 16 bits of summ. |
| 1312 | let summ = see.summrust-analyzer cargo ppmd-rust 1.2.1 internal/See#summ. as u32; |
| 1313 | let r = summ rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().see.shiftrust-analyzer cargo ppmd-rust 1.2.1 internal/See#shift. as i32; |
| 1314 | see.summrust-analyzer cargo ppmd-rust 1.2.1 internal/See#summ. = (summ rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().r) as u16; |
| 1315 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().esc_freq = r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().(r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0) as u32; |
| 1316 | |
| 1317 | SeeSourcerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#::Tablerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#Table#(base_context_idx, see_table_hash) |
| 1318 | } else { |
| 1319 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().esc_freq = 1; |
| 1320 | SeeSourcerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#::Dummyrust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#Dummy# |
| 1321 | } |
| 1322 | } |
| 1323 | } |
| 1324 | |
| 1325 | unsafe fn calculate_see_table_hashrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]calculate_see_table_hash().( |
| 1326 | &mut self, |
| 1327 | num_masked: u32, |
| 1328 | num_stats: u32, |
| 1329 | ) -> (usize, usize) { |
| 1330 | unsafe { |
| 1331 | let mc = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.; |
| 1332 | let base_context_idx = self.ns2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(num_stats rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().2) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().3; |
| 1333 | |
| 1334 | let suffix_context = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(mc.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 1335 | let suffix_num_stats = suffix_context.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as u32; |
| 1336 | let summ_freq = mc.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32; |
| 1337 | |
| 1338 | let freq_distribution_hash = (summ_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().11 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().(num_stats rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1)) as usize; |
| 1339 | let context_hierarchy_hash = |
| 1340 | 2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().((2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().num_stats) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().(suffix_num_stats rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().num_masked)) as usize; |
| 1341 | let symbol_characteristics_hash = mc.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. as usize; |
| 1342 | |
| 1343 | let see_table_hash = |
| 1344 | freq_distribution_hash rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().context_hierarchy_hash rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().symbol_characteristics_hash; |
| 1345 | |
| 1346 | (base_context_idx, see_table_hash) |
| 1347 | } |
| 1348 | } |
| 1349 | |
| 1350 | fn get_seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_see().(&mut self, see_source: SeeSourcerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#) -> &mut Seerust-analyzer cargo ppmd-rust 1.2.1 internal/See# { |
| 1351 | match see_source { |
| 1352 | SeeSourcerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#::Dummyrust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#Dummy# => &mut self.dummy_seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#dummy_see., |
| 1353 | SeeSourcerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#::Tablerust-analyzer cargo ppmd-rust 1.2.1 internal/SeeSource#Table#(i, k) => &mut self.seerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#see.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().k]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut()., |
| 1354 | } |
| 1355 | } |
| 1356 | |
| 1357 | unsafe fn next_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]next_context().(&mut self) { |
| 1358 | unsafe { |
| 1359 | let successor = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().get_successorrust-analyzer cargo ppmd-rust 1.2.1 internal/impl#[State]get_successor().(); |
| 1360 | if self.order_fallrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#order_fall. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 && successor.is_real_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]is_real_context().(self) { |
| 1361 | let context = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(successor); |
| 1362 | self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context. = context; |
| 1363 | self.max_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#max_context. = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.; |
| 1364 | } else { |
| 1365 | self.update_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]update_model().(); |
| 1366 | }; |
| 1367 | } |
| 1368 | } |
| 1369 | |
| 1370 | unsafe fn update1rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]update1().(&mut self) { |
| 1371 | unsafe { |
| 1372 | let mut s = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.; |
| 1373 | let mut freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 1374 | freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().4; |
| 1375 | self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().4; |
| 1376 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 1377 | if freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32 { |
| 1378 | swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/swap().(s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().(), s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1).as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().()); |
| 1379 | s = s.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[isize][Neg]neg().1); |
| 1380 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. = s; |
| 1381 | if freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. as u32 { |
| 1382 | self.rescalerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]rescale().(); |
| 1383 | } |
| 1384 | } |
| 1385 | self.next_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]next_context().(); |
| 1386 | } |
| 1387 | } |
| 1388 | |
| 1389 | unsafe fn update1_0rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]update1_0().(&mut self) { |
| 1390 | unsafe { |
| 1391 | let mut s = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.; |
| 1392 | let mut mc = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.; |
| 1393 | let mut freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 1394 | let summ_freq = mc.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. as u32; |
| 1395 | self.prev_successrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#prev_success. = (2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().summ_freq) as u32; // Ppmd8 (>=) |
| 1396 | self.run_lengthrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#run_length. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().self.prev_successrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#prev_success. as i32; |
| 1397 | mc.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. = (summ_freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().4) as u16; |
| 1398 | freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().4; |
| 1399 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 1400 | if freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. as u32 { |
| 1401 | self.rescalerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]rescale().(); |
| 1402 | } |
| 1403 | self.next_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]next_context().(); |
| 1404 | } |
| 1405 | } |
| 1406 | |
| 1407 | unsafe fn update2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]update2().(&mut self) { |
| 1408 | unsafe { |
| 1409 | let mut s = self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state.; |
| 1410 | let mut freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 1411 | freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().4; |
| 1412 | self.run_lengthrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#run_length. = self.init_rlrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#init_rl.; |
| 1413 | self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2..summ_freqrust-analyzer cargo ppmd-rust 1.2.1 internal/Union2#summ_freq. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().4; |
| 1414 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq as u8; |
| 1415 | if freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().MAX_FREQrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/MAX_FREQ. as u32 { |
| 1416 | self.rescalerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]rescale().(); |
| 1417 | } |
| 1418 | self.update_modelrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]update_model().(); |
| 1419 | } |
| 1420 | } |
| 1421 | |
| 1422 | unsafe fn update_binrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]update_bin().(&mut self, mut s: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>) -> u8 { |
| 1423 | unsafe { |
| 1424 | let freq = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as u32; |
| 1425 | let sym = s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol.; |
| 1426 | self.found_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#found_state. = s; |
| 1427 | self.prev_successrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#prev_success. = 1; |
| 1428 | self.run_lengthrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#run_length. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 1429 | s.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. = freq.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().((freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().196) as u32) as u8; |
| 1430 | self.next_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]next_context().(); |
| 1431 | sym |
| 1432 | } |
| 1433 | } |
| 1434 | |
| 1435 | unsafe fn mask_symbolsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]mask_symbols().(char_mask: &mut [u8; 256], s: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>, mut s2: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#>) { |
| 1436 | unsafe { |
| 1437 | char_mask[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().s.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = 0; |
| 1438 | loop { |
| 1439 | let sym0 = s2.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(0).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as u32; |
| 1440 | let sym1 = s2.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(1).as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().symbolrust-analyzer cargo ppmd-rust 1.2.1 internal/State#symbol. as u32; |
| 1441 | s2 = s2.offsetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]offset().(2); |
| 1442 | char_mask[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().sym0 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = 0; |
| 1443 | char_mask[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().sym1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = 0; |
| 1444 | |
| 1445 | if s2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#ge().s { |
| 1446 | break; |
| 1447 | } |
| 1448 | } |
| 1449 | } |
| 1450 | } |
| 1451 | |
| 1452 | const fn hi_bits_preparerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_prepare().(flag: u32) -> u32 { |
| 1453 | flag rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().0xC0 |
| 1454 | } |
| 1455 | |
| 1456 | const fn hi_bits_convert_3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_convert_3().(flag: u32) -> u32 { |
| 1457 | flag rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().(8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().3) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().3) |
| 1458 | } |
| 1459 | |
| 1460 | const fn hi_bits_convert_4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_convert_4().(flag: u32) -> u32 { |
| 1461 | flag rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().(8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().4) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().4) |
| 1462 | } |
| 1463 | |
| 1464 | const fn hi_bits_flag3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag3().(symbol: u32) -> u32 { |
| 1465 | Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_convert_3rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_convert_3().(Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_preparerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_prepare().(symbol)) |
| 1466 | } |
| 1467 | |
| 1468 | const fn hi_bits_flag4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_flag4().(symbol: u32) -> u32 { |
| 1469 | Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_convert_4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_convert_4().(Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]::hi_bits_preparerust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]hi_bits_prepare().(symbol)) |
| 1470 | } |
| 1471 | |
| 1472 | unsafe fn get_bin_summrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_bin_summ().(&mut self) -> &mut u16 { |
| 1473 | unsafe { |
| 1474 | let state = self.get_single_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_single_state().(self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context.); |
| 1475 | let freq = state.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().freqrust-analyzer cargo ppmd-rust 1.2.1 internal/State#freq. as usize; |
| 1476 | let freq_bin_idx = self.ns2indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().freq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize; |
| 1477 | |
| 1478 | let mc = self.min_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#min_context..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().(); |
| 1479 | let suffix_context = self.get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(mc.suffixrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#suffix.); |
| 1480 | let num_stats = suffix_context.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ref().().num_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#num_stats. as usize; |
| 1481 | |
| 1482 | let context_idx = self |
| 1483 | .prev_successrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#prev_success. |
| 1484 | .wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(self.run_lengthrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#run_length. as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().26 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().0x20) |
| 1485 | .wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(self.ns2bs_indexrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#ns2bs_index.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().num_stats]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32) |
| 1486 | .wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(mc.flagsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#flags. as u32) as usize; |
| 1487 | |
| 1488 | &mut self.bin_summrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#bin_summ.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().freq_bin_idx]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().context_idx]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). |
| 1489 | } |
| 1490 | } |
| 1491 | |
| 1492 | #[inline(always)] |
| 1493 | unsafe fn get_contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_context().(&mut self, suffix: TaggedOffsetrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/TaggedOffset#) -> NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#> { |
| 1494 | unsafe { suffix.as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().(self) } |
| 1495 | } |
| 1496 | |
| 1497 | #[inline(always)] |
| 1498 | fn get_single_staterust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_single_state().(&mut self, context: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>) -> NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#> { |
| 1499 | let context_ptr = context.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(); |
| 1500 | unsafe { |
| 1501 | // Safety: We know that context is not null, so a field address from it can't be null. |
| 1502 | let single_state = &raw mut (*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().context_ptr).union2rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union2.; |
| 1503 | NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#::new_uncheckedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]new_unchecked().(single_state).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]cast().() |
| 1504 | } |
| 1505 | } |
| 1506 | |
| 1507 | #[inline(always)] |
| 1508 | unsafe fn get_multi_state_statsrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]get_multi_state_stats().(&mut self, mut context: NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Contextrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#>) -> NonNullrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/NonNull#<Staterust-analyzer cargo ppmd-rust 1.2.1 internal/State#> { |
| 1509 | unsafe { context.as_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_mut().().union4rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/Context#union4..statsrust-analyzer cargo ppmd-rust 1.2.1 internal/Union4#stats..as_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/tagged_offset/impl#[TaggedOffset]as_ptr().(self) } |
| 1510 | } |
| 1511 | } |
| 1512 | |
| 1513 | impl<R: Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#> PPMd8rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#<RangeDecoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeDecoder#<R>> { |
| 1514 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) fn new_decoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeDecoder<R>>`]new_decoder().( |
| 1515 | reader: R, |
| 1516 | max_order: u32, |
| 1517 | mem_size: u32, |
| 1518 | restore_method: RestoreMethodrust-analyzer cargo ppmd-rust 1.2.1 RestoreMethod#, |
| 1519 | ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeDecoder<R>>`], Errorrust-analyzer cargo ppmd-rust 1.2.1 Error#> { |
| 1520 | let range_decoder = RangeDecoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeDecoder#::newrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/impl#[`RangeDecoder<R>`]new().(reader)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 1521 | Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeDecoder<R>>`]::constructrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]construct().(range_decoder, max_order, mem_size, restore_method) |
| 1522 | } |
| 1523 | |
| 1524 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) fn into_innerrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeDecoder<R>>`]into_inner().(self) -> R { |
| 1525 | let manual_drop_self = ManuallyDroprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/manually_drop/ManuallyDrop#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/manually_drop/impl#[`ManuallyDrop<T>`]new().(self); |
| 1526 | unsafe { |
| 1527 | deallocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc alloc/dealloc().( |
| 1528 | manual_drop_self.memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr..as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 1529 | manual_drop_self.memory_layoutrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_layout., |
| 1530 | ); |
| 1531 | } |
| 1532 | let rc = unsafe { stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::readrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/read().(&manual_drop_self.rcrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#rc.) }; |
| 1533 | let RangeDecoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeDecoder# { readerrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeDecoder#reader., .. } = rc; |
| 1534 | reader |
| 1535 | } |
| 1536 | |
| 1537 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) fn range_decoder_coderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeDecoder<R>>`]range_decoder_code().(&self) -> u32 { |
| 1538 | self.rcrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#rc..coderust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeDecoder#code. |
| 1539 | } |
| 1540 | } |
| 1541 | |
| 1542 | impl<W: Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#> PPMd8rust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#<RangeEncoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeEncoder#<W>> { |
| 1543 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) fn new_encoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeEncoder<W>>`]new_encoder().( |
| 1544 | writer: W, |
| 1545 | max_order: u32, |
| 1546 | mem_size: u32, |
| 1547 | restore_method: RestoreMethodrust-analyzer cargo ppmd-rust 1.2.1 RestoreMethod#, |
| 1548 | ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeEncoder<W>>`], Errorrust-analyzer cargo ppmd-rust 1.2.1 Error#> { |
| 1549 | let range_encoder = RangeEncoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeEncoder#::newrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/impl#[`RangeEncoder<W>`]new().(writer); |
| 1550 | Selfrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeEncoder<W>>`]::constructrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RC>`]construct().(range_encoder, max_order, mem_size, restore_method) |
| 1551 | } |
| 1552 | |
| 1553 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) fn into_innerrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeEncoder<W>>`]into_inner().(self) -> W { |
| 1554 | let manual_drop_self = ManuallyDroprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/manually_drop/ManuallyDrop#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/manually_drop/impl#[`ManuallyDrop<T>`]new().(self); |
| 1555 | unsafe { |
| 1556 | deallocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc alloc/dealloc().( |
| 1557 | manual_drop_self.memory_ptrrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_ptr..as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/non_null/impl#[`NonNull<T>`]as_ptr().(), |
| 1558 | manual_drop_self.memory_layoutrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#memory_layout., |
| 1559 | ); |
| 1560 | } |
| 1561 | let rc = unsafe { stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::readrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/read().(&manual_drop_self.rcrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#rc.) }; |
| 1562 | let RangeEncoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeEncoder# { writerrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/RangeEncoder#writer., .. } = rc; |
| 1563 | writer |
| 1564 | } |
| 1565 | |
| 1566 | pub(craterust-analyzer cargo ppmd-rust 1.2.1 crate/) fn flush_range_encoderrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/impl#[`PPMd8<RangeEncoder<W>>`]flush_range_encoder().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> { |
| 1567 | self.rcrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/PPMd8#rc..flushrust-analyzer cargo ppmd-rust 1.2.1 internal/ppmd8/range_coding/impl#[`RangeEncoder<W>`]flush().() |
| 1568 | } |
| 1569 | } |