Struct object::read::CompressedData
source · pub struct CompressedData<'data> {
pub format: CompressionFormat,
pub data: &'data [u8],
pub uncompressed_size: u64,
}
Expand description
Data that may be compressed.
Fields§
§format: CompressionFormat
The data compression format.
data: &'data [u8]
The compressed data.
uncompressed_size: u64
The uncompressed data size.
Implementations§
source§impl<'data> CompressedData<'data>
impl<'data> CompressedData<'data>
sourcepub fn decompress(self) -> Result<Cow<'data, [u8]>>
pub fn decompress(self) -> Result<Cow<'data, [u8]>>
Return the uncompressed data.
Returns an error for invalid data or unsupported compression.
This includes if the data is compressed but the compression
feature
for this crate is disabled.
Trait Implementations§
source§impl<'data> Clone for CompressedData<'data>
impl<'data> Clone for CompressedData<'data>
source§fn clone(&self) -> CompressedData<'data>
fn clone(&self) -> CompressedData<'data>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more