pub struct StreamingZipReader { /* private fields */ }Expand description
Streaming ZIP archive reader
Implementations§
Source§impl StreamingZipReader
impl StreamingZipReader
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
Open a ZIP file and read its central directory
Sourcepub fn find_entry(&self, name: &str) -> Option<&ZipEntry>
pub fn find_entry(&self, name: &str) -> Option<&ZipEntry>
Find an entry by name
Sourcepub fn read_entry(&mut self, entry: &ZipEntry) -> Result<Vec<u8>>
pub fn read_entry(&mut self, entry: &ZipEntry) -> Result<Vec<u8>>
Read an entry’s decompressed data into a vector
Sourcepub fn read_entry_streaming_by_name(
&mut self,
name: &str,
) -> Result<Box<dyn Read + '_>>
pub fn read_entry_streaming_by_name( &mut self, name: &str, ) -> Result<Box<dyn Read + '_>>
Get a streaming reader for an entry by name (for large files) Returns a reader that decompresses data on-the-fly without loading everything into memory
Auto Trait Implementations§
impl Freeze for StreamingZipReader
impl RefUnwindSafe for StreamingZipReader
impl Send for StreamingZipReader
impl Sync for StreamingZipReader
impl Unpin for StreamingZipReader
impl UnwindSafe for StreamingZipReader
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