pub struct FrameHeader {
pub content_size: Option<u64>,
pub window_size: u64,
pub dict_id: u32,
pub has_checksum: bool,
pub header_size: usize,
}Expand description
A parsed zstd frame header.
Fields§
§content_size: Option<u64>Decompressed size of the frame, when the header stores it.
window_size: u64Window size: how far back matches may reach.
dict_id: u32Dictionary ID, 0 when none is stored.
has_checksum: boolWhether the frame ends with a content checksum.
header_size: usizeSize of the header in bytes, magic number included.
Implementations§
Source§impl FrameHeader
impl FrameHeader
Sourcepub fn parse(src: &[u8]) -> Result<FrameHeader, Error>
pub fn parse(src: &[u8]) -> Result<FrameHeader, Error>
Parses the header of the zstd frame at the start of src.
§Errors
Error::UnknownFrame if src doesn’t start with a zstd frame
(skippable frames included), Error::Truncated if the header is
incomplete, and Error::UnsupportedFrameParameter /
Error::WindowTooLarge for invalid headers.
Trait Implementations§
Source§impl Clone for FrameHeader
impl Clone for FrameHeader
impl Copy for FrameHeader
Source§impl Debug for FrameHeader
impl Debug for FrameHeader
impl Eq for FrameHeader
Source§impl PartialEq for FrameHeader
impl PartialEq for FrameHeader
impl StructuralPartialEq for FrameHeader
Auto Trait Implementations§
impl Forget for FrameHeader
impl Freeze for FrameHeader
impl Move for FrameHeader
impl RefUnwindSafe for FrameHeader
impl Send for FrameHeader
impl Sync for FrameHeader
impl Unpin for FrameHeader
impl UnsafeUnpin for FrameHeader
impl UnwindSafe for FrameHeader
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