AETYXHGO4N5PURYZT7Z5UZDGLAN7CD6JESLFAASLYFEXZKWSFE7AC
let header: crate::tag::FileHeader = bincode::deserialize(&off)?;
let header: crate::tag::FileHeader = bincode::deserialize(&off).map_err(TagError::BincodeDe)?;
let mut ch = OpenTagFile {
file,
header
};
ch.check(h)?;
ch.file.seek(SeekFrom::Start(off.len() as u64))?;
let p = match self.loaded.lock().unwrap().entry(off_aligned) {
Entry::Occupied(mut e) => unsafe {
e.get_mut().as_mut_ptr().add((off - off_aligned) as usize)
},
Entry::Vacant(e) => {
let mut buf = Box::new([0; crate::tag::BLOCK_SIZE]);
self.s
.lock()
.unwrap()
.decompress(&mut buf[..], off_aligned)?;
unsafe { e.insert(buf).as_mut_ptr().add((off - off_aligned) as usize) }
let mut l = self.loaded.lock().unwrap();
let p = if let Some(p) = l.get_mut(&off_aligned) {
unsafe {
p.as_mut_ptr().add((off - off_aligned) as usize)