pub struct StoredZipEntry { /* private fields */ }Expand description
A random-access view over one uncompressed ZIP entry.
Implementations§
Source§impl StoredZipEntry
impl StoredZipEntry
Sourcepub fn is_stored_block_indexed(&self) -> bool
pub fn is_stored_block_indexed(&self) -> bool
true when the entry is stored-block addressable (the fast, no-inflation
path). false means reads go through the full-decompress fallback.
Sourcepub fn block_count(&self) -> usize
pub fn block_count(&self) -> usize
Number of indexed stored blocks (0 for the fallback path).
Sourcepub fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>
pub fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>
Read up to buf.len() bytes of the uncompressed entry starting at
offset. Stored-block entries seek directly to the right block(s) with no
inflation; this method takes &self, so independent reads run lock-free in
parallel (positioned reads). Returns the number of bytes read (short at EOF).
Auto Trait Implementations§
impl Freeze for StoredZipEntry
impl RefUnwindSafe for StoredZipEntry
impl Send for StoredZipEntry
impl Sync for StoredZipEntry
impl Unpin for StoredZipEntry
impl UnsafeUnpin for StoredZipEntry
impl UnwindSafe for StoredZipEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more