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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more