Minor changes

darleybarreto
Aug 1, 2021, 1:52 PM
SO7DQK4GHRPVOMZ2YKWHUWTZ3XUYKVV5OSIEQSHFX6VTUAPJYKFQC

Dependencies

  • [2] NOSZA4ZM Fixing tests
  • [3] HEFGMMUM Start oxidizing 1/N
  • [4] IB4L4N5M Fixing the lifetimes for `Seekable`
  • [5] HELRYMZK Manual bindings (Windows and Clang aren't very good friends), and getting rid of anyhow
  • [6] 6XB4RDRQ Adding changes from original impl
  • [7] IH334Q5A Reboot
  • [8] UPRY2FEL Remove bindgen dependency
  • [9] K6L5F26W Fixing sequential test.
  • [10] HA3ODU4G Fixing compilation
  • [11] L7S3YSSM Clippy + rustfmt
  • [12] GKNZUJV6 Removing unecessary unsafe blocks

Change contents

  • replacement in src/lib.rs at line 16
    [3.175][2.0:25]()
    use twox_hash::XxHash64;
    [3.175]
    [3.216]
    use twox_hash::xxh3::{hash64, Hash64};
  • replacement in src/lib.rs at line 59
    [3.1086][3.1086:1111]()
    xxh_state: XxHash64,
    [3.1086]
    [3.146]
    xxh_state: Hash64,
  • replacement in src/lib.rs at line 85
    [3.1542][3.1542:1591]()
    inn: ZSTD_inBuffer,
    xxh_state: XxHash64,
    [3.1542]
    [3.241980]
    xxh_state: Hash64,
  • replacement in src/lib.rs at line 243
    [3.3857][3.3857:3908]()
    xxh_state: XxHash64::with_seed(0),
    [3.3857]
    [3.3908]
    xxh_state: Hash64::with_seed(0),
  • replacement in src/lib.rs at line 325
    [3.5982][3.5982:6035]()
    self.xxh_state = XxHash64::with_seed(0);
    [3.5982]
    [3.246809]
    self.xxh_state = Hash64::with_seed(0);
  • replacement in src/lib.rs at line 537
    [3.9290][3.9290:9399](),[3.797][3.251816:251840](),[3.1081][3.251816:251840](),[3.9399][3.251816:251840](),[3.251816][3.251816:251840](),[3.251840][3.9400:9462]()
    inn: ZSTD_inBuffer {
    src: ptr::null() as *const c_void,
    size: 0,
    pos: 0,
    },
    xxh_state: XxHash64::with_seed(0),
    [3.9290]
    [3.251995]
    xxh_state: Hash64::with_seed(0),
  • edit in src/lib.rs at line 542
    [3.9565]
    [3.9565]
    // Help the compiler to see it's inbounds
    assert!(self.in_buff.len() == SEEKABLE_BUFF_SIZE);
  • replacement in src/lib.rs at line 592
    [3.11262][3.11262:11295]()
    while idx < num_frames {
    [3.11262]
    [3.11295]
    for idx in 0..num_frames {
  • edit in src/lib.rs at line 620
    [3.253513][3.12407:12430]()
    idx += 1;
  • replacement in src/lib.rs at line 666
    [3.1798][3.1798:1885]()
    let eos = self.seek_table.entries[self.seek_table.entries.len() - 1].d_offset;
    [3.1798]
    [3.1885]
    let eos = self.seek_table.entries.last().unwrap().d_offset;
  • edit in src/lib.rs at line 677
    [3.2085]
    [3.13825]
    let mut inn = ZSTD_inBuffer {
    src: ptr::null() as *const c_void,
    size: 0,
    pos: 0,
    };
  • replacement in src/lib.rs at line 693
    [3.14233][3.14233:14429]()
    self.inn = ZSTD_inBuffer {
    src: self.in_buff.as_ptr() as *const _ as *const c_void,
    size: 0,
    pos: 0,
    };
    [3.14233]
    [3.2241]
    inn.src = self.in_buff.as_ptr() as *const _ as *const c_void;
  • replacement in src/lib.rs at line 695
    [3.2242][3.14429:14486](),[3.14429][3.14429:14486]()
    self.xxh_state = XxHash64::with_seed(0);
    [3.2242]
    [3.2243]
    self.xxh_state = Hash64::with_seed(0);
  • replacement in src/lib.rs at line 736
    [3.15305][3.2744:2823]()
    let (prev_out_pos, prev_in_pos) = (out_tmp.pos, self.inn.pos);
    [3.15305]
    [3.5535]
    let (prev_out_pos, prev_in_pos) = (out_tmp.pos, inn.pos);
  • replacement in src/lib.rs at line 740
    [3.5594][3.5594:5690]()
    to_read = ZSTD_decompressStream(self.dstream, &mut out_tmp, &mut self.inn);
    [3.5594]
    [3.5690]
    to_read = ZSTD_decompressStream(self.dstream, &mut out_tmp, &mut inn);
  • replacement in src/lib.rs at line 764
    [3.3299][3.3299:3361]()
    src_bytes_read += self.inn.pos - prev_in_pos;
    [3.3299]
    [3.3361]
    src_bytes_read += inn.pos - prev_in_pos;
  • replacement in src/lib.rs at line 782
    [3.16768][3.16768:16819]()
    if self.inn.pos == self.inn.size {
    [3.16768]
    [3.16819]
    if inn.pos == inn.size {
  • replacement in src/lib.rs at line 786
    [3.746][3.17111:17194](),[3.5976][3.17111:17194](),[3.17111][3.17111:17194]()
    self.inn.size = to_read;
    self.inn.pos = 0;
    [3.5976]
    [3.17194]
    inn.size = to_read;
    inn.pos = 0;
  • replacement in src/lib.rs at line 863
    [3.20233][3.4613:4692](),[3.4692][3.20319:20361](),[3.20319][3.20319:20361]()
    if offset >= self.seek_table.entries[self.get_num_frames()].d_offset {
    return self.get_num_frames();
    [3.20233]
    [3.20361]
    let n_frames = self.get_num_frames();
    assert!(self.seek_table.entries.len() >= n_frames);
    if offset >= self.seek_table.entries[n_frames].d_offset {
    return n_frames;
  • replacement in src/lib.rs at line 871
    [3.20372][3.20372:20431]()
    let (mut lo, mut hi) = (0, self.get_num_frames());
    [3.20372]
    [3.20431]
    let (mut lo, mut hi) = (0, n_frames);
  • replacement in src/lib.rs at line 940
    [3.21179][2.964:1075]()
    let mut hasher = XxHash64::with_seed(0);
    hasher.write(src);
    let checksum = hasher.finish() as u32;
    [3.21179]
    [3.1239]
    let checksum = hash64(src) as u32;