| 1 | #![forbid(unsafe_code)] |
| 2 | |
| 3 | use craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/::blocksortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/::block_sortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/block_sort().; |
| 4 | use craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/::bzlibrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/::{EStaterust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#, BZ_MAX_SELECTORSrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_MAX_SELECTORS., BZ_N_GROUPSrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_GROUPS., BZ_N_ITERSrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_ITERS., BZ_RUNArust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_RUNA., BZ_RUNBrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_RUNB.}; |
| 5 | use craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/::{assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!, debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!, debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!, huffmanrust-analyzer cargo libbz2-rs-sys 0.2.5 huffman/}; |
| 6 | |
| 7 | pub(craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/) struct EWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter# { |
| 8 | pub num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#num_z.: u32, |
| 9 | bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#bs_live.: i32, |
| 10 | bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#bs_buff.: u32, |
| 11 | } |
| 12 | |
| 13 | pub(craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/) struct LiveWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#<'a> { |
| 14 | zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#zbits.: &'a mut [u8], |
| 15 | writerrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#writer.: &'a mut EWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#, |
| 16 | num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z.: u32, |
| 17 | bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live.: i32, |
| 18 | bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff.: u32, |
| 19 | } |
| 20 | |
| 21 | impl Droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/drop/Drop# for LiveWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#<'_> { |
| 22 | fn droprust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'_>`][Drop]drop().(&mut self) { |
| 23 | self.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#writer..num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#num_z. = self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z.; |
| 24 | self.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#writer..bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#bs_buff. = self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff.; |
| 25 | self.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#writer..bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#bs_live. = self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live.; |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | impl<'a> LiveWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#<'a> { |
| 30 | fn newrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]new().(writer: &'a mut EWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#, zbits: &'a mut [u8]) -> Selfrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`] { |
| 31 | Selfrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`] { |
| 32 | num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z.: writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#num_z., |
| 33 | bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live.: writer.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#bs_live., |
| 34 | bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff.: writer.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#bs_buff., |
| 35 | zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#zbits., |
| 36 | writerrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#writer., |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | fn initializerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]initialize().(&mut self) { |
| 41 | self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. = 0; |
| 42 | self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff. = 0; |
| 43 | } |
| 44 | |
| 45 | #[inline] |
| 46 | fn finishrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]finish().(&mut self) { |
| 47 | while self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. 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().0 { |
| 48 | self.zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#zbits.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff. 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().24) as u8; |
| 49 | self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. 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; |
| 50 | self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff. 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().8; |
| 51 | self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. 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().8; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | #[inline] |
| 56 | fn flush_whole_bytesrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]flush_whole_bytes().(&mut self) { |
| 57 | let range = self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. 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().4; |
| 58 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dst) = self.zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#zbits..get_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get_mut().(range) { |
| 59 | dst.copy_from_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]copy_from_slice().(&self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff..to_be_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_be_bytes().()); |
| 60 | let bits_written = self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand().!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][Not]not().7; |
| 61 | self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff. 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().bits_written; |
| 62 | self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. 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().bits_written; |
| 63 | self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. 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().(bits_written 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().8) as u32; |
| 64 | } |
| 65 | |
| 66 | while self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().8 { |
| 67 | self.zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#zbits.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff. 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().24) as u8; |
| 68 | self.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. 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; |
| 69 | self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff. 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().8; |
| 70 | self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. 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().8; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | fn writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(&mut self, n: u8, v: u32) { |
| 75 | self.flush_whole_bytesrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]flush_whole_bytes().(); |
| 76 | |
| 77 | self.bs_buffrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_buff. 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().v 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().(32 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().self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. 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().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<u8>`]from().(n)); |
| 78 | self.bs_liverust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#bs_live. 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().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<u8>`]from().(n); |
| 79 | } |
| 80 | |
| 81 | fn write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(&mut self, c: u8) { |
| 82 | self.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(8, c as u32); |
| 83 | } |
| 84 | |
| 85 | fn write_u32rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u32().(&mut self, u: u32) { |
| 86 | let [a, b, c, d] = u.to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().(); |
| 87 | |
| 88 | self.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(8, d as u32); |
| 89 | self.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(8, c as u32); |
| 90 | self.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(8, b as u32); |
| 91 | self.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(8, a as u32); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | fn make_maps_erust-analyzer cargo libbz2-rs-sys 0.2.5 compress/make_maps_e().(s: &mut EStaterust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#) { |
| 96 | s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse. = 0; |
| 97 | for (i, in_use) in s.inUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#inUse..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 98 | if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().in_use { |
| 99 | s.unseqToSeqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#unseqToSeq.[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(). = s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse. as u8; |
| 100 | s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse. 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; |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | fn generate_mtf_valuesrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/generate_mtf_values().(s: &mut EStaterust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#) { |
| 106 | /* |
| 107 | After sorting (eg, here), |
| 108 | s.arr1 [ 0 .. s->nblock-1 ] holds sorted order, |
| 109 | and |
| 110 | s.arr2 [ 0 .. s->nblock-1 ] |
| 111 | holds the original block data. |
| 112 | |
| 113 | The first thing to do is generate the MTF values, |
| 114 | and put them in |
| 115 | s.arr1 [ 0 .. s->nblock-1 ]. |
| 116 | Because there are strictly fewer or equal MTF values |
| 117 | than block values, ptr values in this area are overwritten |
| 118 | with MTF values only when they are no longer needed. |
| 119 | |
| 120 | The final compressed bitstream is generated into the |
| 121 | area starting at |
| 122 | (UChar*) (&((UChar*)s->arr2)[s->nblock]) |
| 123 | |
| 124 | These storage aliases are set up in bzCompressInit(), |
| 125 | except for the last one, which is arranged in |
| 126 | compressBlock(). |
| 127 | */ |
| 128 | |
| 129 | make_maps_erust-analyzer cargo libbz2-rs-sys 0.2.5 compress/make_maps_e().(s); |
| 130 | let EOB = s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse. 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; |
| 131 | |
| 132 | s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[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/range/RangeToInclusive#EOB as usize]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().(0); |
| 133 | |
| 134 | let mut wr = 0; |
| 135 | let mut zPend = 0; |
| 136 | |
| 137 | let mut yy: [u8; 256] = [0; 256]; |
| 138 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse. { |
| 139 | yy[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; |
| 140 | } |
| 141 | |
| 142 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. { |
| 143 | debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!(wr <= i, "generateMTFValues(1)"); |
| 144 | let mut j = s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..ptrrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]ptr().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(1) as i32; |
| 145 | if j 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 { |
| 146 | j 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().s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock.; |
| 147 | } |
| 148 | let ll_i: u8 = s.unseqToSeqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#unseqToSeq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().s.arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr2..blockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]block().(s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. as usize)[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 149 | debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!((ll_i as i32) <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse., "generateMTFValues(2a)"); |
| 150 | |
| 151 | if yy[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(). 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().ll_i { |
| 152 | zPend 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; |
| 153 | } else { |
| 154 | if zPend 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().0 { |
| 155 | zPend 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; |
| 156 | loop { |
| 157 | if zPend rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand().1 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 { |
| 158 | s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..mtfvrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]mtfv().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().wr as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = 1; |
| 159 | wr 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; |
| 160 | s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[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(). 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; |
| 161 | } else { |
| 162 | s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..mtfvrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]mtfv().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().wr as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = 0; |
| 163 | wr 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; |
| 164 | s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[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(). 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; |
| 165 | } |
| 166 | if zPend 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().2 { |
| 167 | break; |
| 168 | } |
| 169 | zPend = (zPend 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().2) 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().2; |
| 170 | } |
| 171 | zPend = 0; |
| 172 | } |
| 173 | |
| 174 | { |
| 175 | let mut rtmp: u8; |
| 176 | rtmp = yy[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 177 | yy[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(). = yy[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().; |
| 178 | j = 1; |
| 179 | while ll_i 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().rtmp { |
| 180 | j 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; |
| 181 | corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::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().(&mut rtmp, &mut yy[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().); |
| 182 | } |
| 183 | yy[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(). = rtmp; |
| 184 | s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..mtfvrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]mtfv().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().wr as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (j 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; |
| 185 | wr 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; |
| 186 | s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().(j 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 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#[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; |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | if zPend 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().0 { |
| 192 | zPend 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; |
| 193 | loop { |
| 194 | if zPend rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitAnd<Self>`]bitand().1 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 { |
| 195 | s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..mtfvrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]mtfv().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().wr as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = BZ_RUNBrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_RUNB.; |
| 196 | wr 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; |
| 197 | s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().BZ_RUNBrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_RUNB. 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#[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; |
| 198 | } else { |
| 199 | s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..mtfvrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]mtfv().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().wr as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = BZ_RUNArust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_RUNA.; |
| 200 | wr 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; |
| 201 | s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().BZ_RUNArust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_RUNA. 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#[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; |
| 202 | } |
| 203 | if zPend 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().2 { |
| 204 | break; |
| 205 | } |
| 206 | zPend = (zPend 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().2) 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().2; |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..mtfvrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]mtfv().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().wr as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = EOB as u16; |
| 211 | wr 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; |
| 212 | s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().EOB 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#[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; |
| 213 | |
| 214 | s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. = wr; |
| 215 | } |
| 216 | |
| 217 | fn send_mtf_valuesrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/send_mtf_values().(s: &mut EStaterust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#) { |
| 218 | const BZ_LESSER_ICOSTrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/BZ_LESSER_ICOST.: u8 = 0; |
| 219 | const BZ_GREATER_ICOSTrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/BZ_GREATER_ICOST.: u8 = 15; |
| 220 | |
| 221 | let mut gs: i32; |
| 222 | let mut ge: i32; |
| 223 | let mut totc: i32; |
| 224 | let mut bt: i32; |
| 225 | let mut bc: i32; |
| 226 | let mut nSelectors: usize = 0; |
| 227 | let mut selCtr: usize; |
| 228 | let mut nBytes: i32; |
| 229 | |
| 230 | /*-- |
| 231 | s.len: [[u8; BZ_MAX_ALPHA_SIZE]; BZ_N_GROUPS]; |
| 232 | is a global because the decoder also needs it. |
| 233 | |
| 234 | s.code: [[i32; BZ_MAX_ALPHA_SIZE]; BZ_N_GROUPS]; |
| 235 | s.rfreq: [[i32; BZ_MAX_ALPHA_SIZE]; BZ_N_GROUPS]; |
| 236 | |
| 237 | are also globals only used in this proc. |
| 238 | Made global to keep stack frame size small. |
| 239 | --*/ |
| 240 | |
| 241 | let mtfv = s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..mtfvrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]mtfv().(); |
| 242 | |
| 243 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 244 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!( |
| 245 | " {} in block, {} after MTF & 1-2 coding, {}+2 syms in use", |
| 246 | s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock., |
| 247 | s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF., |
| 248 | s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse., |
| 249 | ); |
| 250 | } |
| 251 | |
| 252 | let alphaSize = usize::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/ptr_try_from_impls/impl#[usize][`TryFrom<i32>`]try_from().(s.nInUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nInUse. 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).unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or().(0); |
| 253 | |
| 254 | for t in s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len..iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().() { |
| 255 | t[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#alphaSize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut()..fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().(BZ_GREATER_ICOSTrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/BZ_GREATER_ICOST.); |
| 256 | } |
| 257 | |
| 258 | /*--- Decide how many coding tables to use ---*/ |
| 259 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. >rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). 0, 3001); |
| 260 | let nGroups: usize = match s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. { |
| 261 | 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#200 => 2, |
| 262 | 200..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#600 => 3, |
| 263 | 600..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#1200 => 4, |
| 264 | 1200..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#2400 => 5, |
| 265 | _ => 6, |
| 266 | }; |
| 267 | |
| 268 | let mut cost: [u16; 6] = [0; 6]; |
| 269 | let cost = &mut cost[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/range/RangeTo#nGroups]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().; |
| 270 | |
| 271 | let mut fave: [i32; 6] = [0; 6]; |
| 272 | let fave = &mut fave[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/range/RangeTo#nGroups]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().; |
| 273 | |
| 274 | /*--- Generate an initial set of coding tables ---*/ |
| 275 | { |
| 276 | let mut tFreq: i32; |
| 277 | let mut aFreq: i32; |
| 278 | |
| 279 | let mut nPart = nGroups; |
| 280 | let mut remF = s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF.; |
| 281 | let mut gs = 0i32; |
| 282 | |
| 283 | while nPart rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 { |
| 284 | tFreq = remF 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().nPart as i32; |
| 285 | ge = gs 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; |
| 286 | aFreq = 0; |
| 287 | while aFreq 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().tFreq && ge 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().alphaSize 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().1 { |
| 288 | ge 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; |
| 289 | aFreq 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().s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ge as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 290 | } |
| 291 | if ge 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().gs && nPart rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().nGroups && nPart rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().1 && (nGroups 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().nPart) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().2 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().1 { |
| 292 | aFreq 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().s.mtfFreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#mtfFreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ge as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 293 | ge 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; |
| 294 | } |
| 295 | |
| 296 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 297 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!( |
| 298 | " initial group {}, [{} .. {}], has {} syms ({:4.1}%)", |
| 299 | nPart, |
| 300 | gs, |
| 301 | ge, |
| 302 | aFreq, |
| 303 | 100.0f64 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). aFreq as f64 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. as f64, |
| 304 | ); |
| 305 | } |
| 306 | |
| 307 | for v in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#alphaSize { |
| 308 | s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().nPart 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]`][`IndexMut<I>`]index_mut().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().v]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = if (gs..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#ge).containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/impl#[`RangeInclusive<Idx>`]contains().(&(v as i32)) { |
| 309 | BZ_LESSER_ICOSTrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/BZ_LESSER_ICOST. |
| 310 | } else { |
| 311 | BZ_GREATER_ICOSTrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/BZ_GREATER_ICOST. |
| 312 | }; |
| 313 | } |
| 314 | nPart rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().1; |
| 315 | gs = ge 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; |
| 316 | remF 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().aFreq; |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | /*--- |
| 321 | Iterate up to BZ_N_ITERS times to improve the tables. |
| 322 | ---*/ |
| 323 | for iter in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#BZ_N_ITERSrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_ITERS. { |
| 324 | fave.fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().(0); |
| 325 | |
| 326 | for t in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#nGroups { |
| 327 | s.rfreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#rfreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().t]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()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#alphaSize]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().(0); |
| 328 | } |
| 329 | |
| 330 | /*--- |
| 331 | Set up an auxiliary length table which is used to fast-track |
| 332 | the common case (nGroups == 6). |
| 333 | ---*/ |
| 334 | if nGroups 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().6 { |
| 335 | for v in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#alphaSize { |
| 336 | s.len_packrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len_pack.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().v]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().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = ((s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]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 array/impl#[`[T; N]`][`Index<I>`]index().v]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/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().16) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().(s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[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().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().v]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32); |
| 337 | s.len_packrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len_pack.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().v]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().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = ((s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().3]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 array/impl#[`[T; N]`][`Index<I>`]index().v]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/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().16) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().(s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]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 array/impl#[`[T; N]`][`Index<I>`]index().v]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32); |
| 338 | s.len_packrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len_pack.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().v]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().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = ((s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().5]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 array/impl#[`[T; N]`][`Index<I>`]index().v]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/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().16) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().(s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4]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 array/impl#[`[T; N]`][`Index<I>`]index().v]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32); |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | nSelectors = 0; |
| 343 | totc = 0; |
| 344 | gs = 0; |
| 345 | loop { |
| 346 | /*--- Set group start & end marks. --*/ |
| 347 | if gs 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. { |
| 348 | break; |
| 349 | } |
| 350 | ge = gs 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().50 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; |
| 351 | if ge 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. { |
| 352 | ge = s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. 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; |
| 353 | } |
| 354 | |
| 355 | /*-- |
| 356 | Calculate the cost of this group as coded |
| 357 | by each of the coding tables. |
| 358 | --*/ |
| 359 | cost.fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().(0); |
| 360 | |
| 361 | if nGroups 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().6 && 50 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().ge 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().gs 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 { |
| 362 | let mut cost01: u32 = 0; |
| 363 | let mut cost23: u32 = 0; |
| 364 | let mut cost45: u32 = 0; |
| 365 | |
| 366 | for chunk in mtfv[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().gs as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#50]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()..chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(10) { |
| 367 | for icv in chunk { |
| 368 | let [a, b, c, _] = s.len_packrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len_pack.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u16>`]from().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().icv)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 369 | cost01 = cost01.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(a); |
| 370 | cost23 = cost23.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(b); |
| 371 | cost45 = cost45.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(c); |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | cost[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (cost01 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().0xffff) as u16; |
| 376 | cost[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (cost01 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().16) as u16; |
| 377 | cost[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (cost23 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().0xffff) as u16; |
| 378 | cost[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (cost23 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().16) as u16; |
| 379 | cost[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (cost45 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().0xffff) as u16; |
| 380 | cost[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = (cost45 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().16) as u16; |
| 381 | } else { |
| 382 | /*--- slow version which correctly handles all situations ---*/ |
| 383 | for i in gs..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#ge { |
| 384 | let icv_0: u16 = mtfv[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 385 | |
| 386 | for (t, c) in cost.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 387 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().c = (*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().c 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.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().t]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 array/impl#[`[T; N]`][`Index<I>`]index().icv_0 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as i32) as u16; |
| 388 | } |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | /*-- |
| 393 | Find the coding table which is best for this group, |
| 394 | and record its identity in the selector table. |
| 395 | --*/ |
| 396 | bc = 999999999; |
| 397 | bt = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1; |
| 398 | for (t, &c) in cost.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 399 | if (c 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().bc { |
| 400 | bc = c as i32; |
| 401 | bt = t as i32; |
| 402 | } |
| 403 | } |
| 404 | totc 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().bc; |
| 405 | fave[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().bt as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). 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; |
| 406 | s.selectorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selector.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().nSelectors]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = bt as u8; |
| 407 | nSelectors rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; |
| 408 | |
| 409 | if nGroups 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().6 && 50 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().ge 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().gs 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 { |
| 410 | for chunk in mtfv[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().gs as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#50]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()..chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(10) { |
| 411 | for &mtfv_i in chunk { |
| 412 | s.rfreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#rfreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().bt 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 array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u16>`]from().(mtfv_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 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; |
| 413 | } |
| 414 | } |
| 415 | } else { |
| 416 | for i in gs..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#ge { |
| 417 | s.rfreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#rfreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().bt 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 array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().mtfv[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#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#[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; |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | gs = ge 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; |
| 422 | } |
| 423 | |
| 424 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 425 | debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!!( |
| 426 | " pass {}: size is {}, grp uses are ", |
| 427 | iter +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 1, |
| 428 | totc /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Div<Self>`]div(). 8, |
| 429 | ); |
| 430 | for f in fave.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() { |
| 431 | debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!!("{} ", f); |
| 432 | } |
| 433 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!(); |
| 434 | } |
| 435 | |
| 436 | /*-- |
| 437 | Recompute the tables based on the accumulated frequencies. |
| 438 | --*/ |
| 439 | /* maxLen was changed from 20 to 17 in bzip2-1.0.3. See |
| 440 | comment in huffman.c for details. */ |
| 441 | for t in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#nGroups { |
| 442 | huffmanrust-analyzer cargo libbz2-rs-sys 0.2.5 huffman/::make_code_lengthsrust-analyzer cargo libbz2-rs-sys 0.2.5 huffman/make_code_lengths().(&mut s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().t]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut()., &s.rfreqrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#rfreq.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().t]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., alphaSize, 17); |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(nGroups <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). 8, 3002); |
| 447 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(nSelectors <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). 32768, 3003); |
| 448 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(nSelectors <= usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u16>`]from().(BZ_MAX_SELECTORSrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_MAX_SELECTORS.), 3003); |
| 449 | |
| 450 | /*--- Compute MTF values for the selectors. ---*/ |
| 451 | { |
| 452 | let mut pos: [u8; BZ_N_GROUPSrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_GROUPS.] = [0, 1, 2, 3, 4, 5]; |
| 453 | |
| 454 | let mut tmp2: u8; |
| 455 | let mut tmp: u8; |
| 456 | |
| 457 | for (i, &ll_i) in s.selectorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selector.[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/range/RangeTo#nSelectors]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 458 | let mut j = 0; |
| 459 | tmp = pos[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 460 | while ll_i 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().tmp { |
| 461 | j 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; |
| 462 | tmp2 = tmp; |
| 463 | tmp = pos[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 464 | pos[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = tmp2; |
| 465 | } |
| 466 | pos[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(). = tmp; |
| 467 | s.selectorMtfrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selectorMtf.[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(). = j as u8; |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | /*--- Assign actual codes for the tables. --*/ |
| 472 | for (t, len) in s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[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/range/RangeTo#nGroups]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 473 | let len = &len[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#alphaSize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 474 | |
| 475 | let mut minLen = 32; |
| 476 | let mut maxLen = 0; |
| 477 | |
| 478 | for &l in len { |
| 479 | maxLen = Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#max().(maxLen, l); |
| 480 | minLen = Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#min().(minLen, l); |
| 481 | } |
| 482 | |
| 483 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(maxLen <= 17, 3004); |
| 484 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(minLen >= 1, 3005); |
| 485 | |
| 486 | huffmanrust-analyzer cargo libbz2-rs-sys 0.2.5 huffman/::assign_codesrust-analyzer cargo libbz2-rs-sys 0.2.5 huffman/assign_codes().(&mut s.coderust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#code.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().t]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut()., len, minLen, maxLen); |
| 487 | } |
| 488 | |
| 489 | /*--- Transmit the mapping table. ---*/ |
| 490 | let mut writer = LiveWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#::newrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]new().(&mut s.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#writer., s.arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr2..zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]zbits().(s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. as usize)); |
| 491 | |
| 492 | { |
| 493 | let inUse16: [bool; 16] = |
| 494 | corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::arrayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/::from_fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/from_fn().(|i| s.inUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#inUse.[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#[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().16..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]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 slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#16]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]any().(|x| *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().x)); |
| 495 | |
| 496 | nBytes = writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32; |
| 497 | for in_use in inUse16 { |
| 498 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(1, in_use as u32); |
| 499 | } |
| 500 | for (i, any_in_use) in inUse16.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 501 | if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().any_in_use { |
| 502 | for j in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#16 { |
| 503 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(1, s.inUserust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#inUse.[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#[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().16 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().j]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u32); |
| 504 | } |
| 505 | } |
| 506 | } |
| 507 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 508 | debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!!(" bytes: mapping {}, ", writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). nBytes,); |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | /*--- Now the selectors. ---*/ |
| 513 | nBytes = writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32; |
| 514 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(3, nGroups as u32); |
| 515 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(15, nSelectors as u32); |
| 516 | |
| 517 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#nSelectors { |
| 518 | for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#s.selectorMtfrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selectorMtf.[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 array/impl#[`[T; N]`][`Index<I>`]index(). { |
| 519 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(1, 1); |
| 520 | } |
| 521 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(1, 0); |
| 522 | } |
| 523 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 524 | debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!!("selectors {}, ", writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). nBytes); |
| 525 | } |
| 526 | |
| 527 | /*--- Now the coding tables. ---*/ |
| 528 | nBytes = writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32; |
| 529 | |
| 530 | for t in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#nGroups { |
| 531 | let mut curr = s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().t]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 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().; |
| 532 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(5, curr as u32); |
| 533 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#alphaSize { |
| 534 | while curr 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().s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().t]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 array/impl#[`[T; N]`][`Index<I>`]index().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). { |
| 535 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(2, 2); |
| 536 | curr 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; |
| 537 | } |
| 538 | while curr rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().t]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 array/impl#[`[T; N]`][`Index<I>`]index().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). { |
| 539 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(2, 3); |
| 540 | curr 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; |
| 541 | } |
| 542 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(1, 0); |
| 543 | } |
| 544 | } |
| 545 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 546 | debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!!("code lengths {}, ", writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). nBytes); |
| 547 | } |
| 548 | |
| 549 | /*--- And finally, the block data proper ---*/ |
| 550 | nBytes = writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32; |
| 551 | selCtr = 0; |
| 552 | gs = 0; |
| 553 | loop { |
| 554 | if gs 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. { |
| 555 | break; |
| 556 | } |
| 557 | ge = gs 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().50 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; |
| 558 | if ge 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. { |
| 559 | ge = s.nMTFrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nMTF. 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; |
| 560 | } |
| 561 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!((s.selectorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selector.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().selCtr]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][`PartialOrd<Self>`]lt(). nGroups, 3006); |
| 562 | if nGroups 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().6 && 50 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().ge 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().gs 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 { |
| 563 | /*--- fast track the common case ---*/ |
| 564 | |
| 565 | let s_len_sel_selCtr = s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().s.selectorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selector.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().selCtr]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]`][`Index<I>`]index().; |
| 566 | let s_code_sel_selCtr = s.coderust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#code.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().s.selectorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selector.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().selCtr]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]`][`Index<I>`]index().; |
| 567 | |
| 568 | for chunk in mtfv[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().gs as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#50]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()..chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(10) { |
| 569 | for &mtfv_i in chunk { |
| 570 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().( |
| 571 | s_len_sel_selCtr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u16>`]from().(mtfv_i)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 572 | s_code_sel_selCtr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u16>`]from().(mtfv_i)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 573 | ); |
| 574 | } |
| 575 | } |
| 576 | } else { |
| 577 | /*--- slow version which correctly handles all situations ---*/ |
| 578 | for i in gs..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#ge { |
| 579 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().( |
| 580 | s.lenrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#len.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().s.selectorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selector.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().selCtr]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]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().mtfv[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 581 | s.coderust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#code.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().s.selectorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#selector.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().selCtr]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]`][`Index<I>`]index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().mtfv[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 582 | ); |
| 583 | } |
| 584 | } |
| 585 | gs = ge 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; |
| 586 | selCtr rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; |
| 587 | } |
| 588 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(selCtr == nSelectors, 3007); |
| 589 | |
| 590 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 591 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!("codes {}", writer.num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#num_z. as i32 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). nBytes); |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | pub(craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/) fn compress_blockrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/compress_block().(s: &mut EStaterust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#, is_last_block: bool) { |
| 596 | if s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. 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().0 { |
| 597 | s.blockCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockCRC. = !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][Not]not().s.blockCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockCRC.; |
| 598 | s.combinedCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#combinedCRC. = s.combinedCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#combinedCRC..rotate_leftrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]rotate_left().(1); |
| 599 | s.combinedCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#combinedCRC. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitXorAssign<Self>`]bitxor_assign().^=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitXorAssign<Self>`]bitxor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitXorAssign<Self>`]bitxor_assign().s.blockCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockCRC.; |
| 600 | if s.blockNorust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockNo. 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().1 { |
| 601 | s.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#writer..num_zrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/EWriter#num_z. = 0; |
| 602 | } |
| 603 | |
| 604 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().2 { |
| 605 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!( |
| 606 | " block {}: crc = 0x{:08x}, combined CRC = 0x{:08x}, size = {}", |
| 607 | s.blockNorust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockNo., |
| 608 | s.blockCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockCRC., |
| 609 | s.combinedCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#combinedCRC., |
| 610 | s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock., |
| 611 | ); |
| 612 | } |
| 613 | |
| 614 | block_sortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/block_sort().(s); |
| 615 | } |
| 616 | |
| 617 | { |
| 618 | /*-- If this is the first block, create the stream header. --*/ |
| 619 | if s.blockNorust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockNo. 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().1 { |
| 620 | let mut writer = LiveWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#::newrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]new().(&mut s.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#writer., s.arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr2..zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]zbits().(s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. as usize)); |
| 621 | |
| 622 | writer.initializerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]initialize().(); |
| 623 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(b'B'); |
| 624 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(b'Z'); |
| 625 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(b'h'); |
| 626 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(b'0' 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().s.blockSize100krust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockSize100k. as u8); |
| 627 | } |
| 628 | |
| 629 | if s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. 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().0 { |
| 630 | let mut writer = LiveWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#::newrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]new().(&mut s.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#writer., s.arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr2..zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]zbits().(s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. as usize)); |
| 631 | |
| 632 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x31); |
| 633 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x41); |
| 634 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x59); |
| 635 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x26); |
| 636 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x53); |
| 637 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x59); |
| 638 | |
| 639 | /*-- Now the block's CRC, so it is in a known place. --*/ |
| 640 | writer.write_u32rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u32().(s.blockCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#blockCRC.); |
| 641 | |
| 642 | /*-- |
| 643 | Now a single bit indicating (non-)randomisation. |
| 644 | As of version 0.9.5, we use a better sorting algorithm |
| 645 | which makes randomisation unnecessary. So always set |
| 646 | the randomised bit to 'no'. Of course, the decoder |
| 647 | still needs to be able to handle randomised blocks |
| 648 | so as to maintain backwards compatibility with |
| 649 | older versions of bzip2. |
| 650 | --*/ |
| 651 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(1, 0); |
| 652 | |
| 653 | writer.writerust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write().(24, s.origPtrrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#origPtr. as u32); |
| 654 | |
| 655 | droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/drop().(writer); |
| 656 | |
| 657 | generate_mtf_valuesrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/generate_mtf_values().(s); |
| 658 | |
| 659 | send_mtf_valuesrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/send_mtf_values().(s); |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | /*-- If this is the last block, add the stream trailer. --*/ |
| 664 | if is_last_block { |
| 665 | let mut writer = LiveWriterrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/LiveWriter#::newrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]new().(&mut s.writerrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#writer., s.arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr2..zbitsrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]zbits().(s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. as usize)); |
| 666 | |
| 667 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x17); |
| 668 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x72); |
| 669 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x45); |
| 670 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x38); |
| 671 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x50); |
| 672 | writer.write_u8rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u8().(0x90); |
| 673 | writer.write_u32rust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]write_u32().(s.combinedCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#combinedCRC.); |
| 674 | |
| 675 | if s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity. 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(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().2 { |
| 676 | debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!!(" final combined CRC = 0x{:08x}\n ", s.combinedCRCrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#combinedCRC.); |
| 677 | } |
| 678 | |
| 679 | writer.finishrust-analyzer cargo libbz2-rs-sys 0.2.5 compress/impl#[`LiveWriter<'a>`]finish().(); |
| 680 | } |
| 681 | } |