pub struct Header {
modification_time: u32,
compression_level: CompressionLevel,
os: Os,
is_text: bool,
is_verified: bool,
extra_field: Option<ExtraField>,
filename: Option<CString>,
comment: Option<CString>,
}
Expand description
GZIP Header.
Fields§
§modification_time: u32
§compression_level: CompressionLevel
§os: Os
§is_text: bool
§is_verified: bool
§extra_field: Option<ExtraField>
§filename: Option<CString>
§comment: Option<CString>
Implementations§
source§impl Header
impl Header
sourcepub fn modification_time(&self) -> u32
pub fn modification_time(&self) -> u32
Returns the modification time (UNIX timestamp).
sourcepub fn compression_level(&self) -> CompressionLevel
pub fn compression_level(&self) -> CompressionLevel
Returns the compression level.
sourcepub fn is_text(&self) -> bool
pub fn is_text(&self) -> bool
Returns true
if the stream is probably ASCII text, false
otherwise.
sourcepub fn is_verified(&self) -> bool
pub fn is_verified(&self) -> bool
Returns true
if the header bytes is verified by CRC-16, false
otherwise.
sourcepub fn extra_field(&self) -> Option<&ExtraField>
pub fn extra_field(&self) -> Option<&ExtraField>
Returns the extra field.
fn flags(&self) -> u8
fn crc16(&self) -> u16
fn write_to<W>(&self, writer: W) -> Result<()>where W: Write,
pub(crate) fn read_from<R>(reader: R) -> Result<Self>where R: Read,
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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