Struct zip_rs::CompressedZipFile
source · pub struct CompressedZipFile<'a> {
pub metadata: Metadata<'a>,
/* private fields */
}Expand description
A single compressed zip file
Fields§
§metadata: Metadata<'a>Implementations§
source§impl<'a> CompressedZipFile<'a>
impl<'a> CompressedZipFile<'a>
pub fn compressed_contents(&self) -> &[u8] ⓘ
sourcepub fn write(&self, w: &mut dyn Write) -> Result<(), ZipParseError>
pub fn write(&self, w: &mut dyn Write) -> Result<(), ZipParseError>
Efficiently writes decompressed contents to sink without loading full decompressed contents into memory
sourcepub fn decompressed_contents(&self) -> Result<Cow<'_, [u8]>, ZipParseError>
pub fn decompressed_contents(&self) -> Result<Cow<'_, [u8]>, ZipParseError>
Decompress contents in one go into memory
pub fn file_path(&self) -> &Path
pub fn file_path_bytes(&self) -> &'a [u8] ⓘ
pub fn compression_method(&self) -> CompressionMethod
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for CompressedZipFile<'a>
impl<'a> Send for CompressedZipFile<'a>
impl<'a> Sync for CompressedZipFile<'a>
impl<'a> Unpin for CompressedZipFile<'a>
impl<'a> UnwindSafe for CompressedZipFile<'a>
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