
    let mut off = off;
    let mut len = len;
    let mut cb: i32 = 0;

    match self.cache.borrow().as_ref() {
      Some(cache) => {
        if self.pos.get() >= cache.pos {
          let bytes_available_in_cache =
            cache.pos as usize + cache.uncompressed_data.len() - self.pos.get() as usize;
          if bytes_available_in_cache > 0 {