Struct GnuSparseHeader
#[repr(C)]
pub struct GnuSparseHeader { pub offset: [u8; 12], pub numbytes: [u8; 12] }
Description of the header of a sparse entry.
Specifies the offset/number of bytes of a chunk of data in octal.
Fields
offset: [u8; 12]numbytes: [u8; 12]
Implementations
impl GnuSparseHeader
fn is_empty(&self) -> boolReturns true if block is empty
fn offset(&self) -> Result<u64>Offset of the block from the start of the file
Returns
Errfor a malformedoffsetfield.fn set_offset(&mut self, offset: u64)Encodes the
offsetprovided into this header.fn length(&self) -> Result<u64>Length of the block
Returns
Errfor a malformednumbytesfield.fn set_length(&mut self, length: u64)Encodes the
lengthprovided into this header.
Trait Implementations
impl Debug for GnuSparseHeader
fn fmt(&self, f: &mut Formatter<'_>) -> Result