pub struct SuperBlock {Show 19 fields
pub magic: [u8; 4],
pub inode_count: u32,
pub mod_time: u32,
pub block_size: u32,
pub frag_count: u32,
pub compressor: Compressor,
pub block_log: u16,
pub flags: u16,
pub id_count: u16,
pub version_major: u16,
pub version_minor: u16,
pub root_inode: u64,
pub bytes_used: u64,
pub id_table: u64,
pub xattr_table: u64,
pub inode_table: u64,
pub dir_table: u64,
pub frag_table: u64,
pub export_table: u64,
}Expand description
Contains important information about the archive, including the locations of other sections
Fields§
§magic: [u8; 4]Must be set to 0x73717368 (“hsqs” on disk).
inode_count: u32The number of inodes stored in the archive.
mod_time: u32Last modification time of the archive. Count seconds since 00:00, Jan 1st 1970 UTC (not counting leap seconds). This is unsigned, so it expires in the year 2106 (as opposed to 2038).
block_size: u32The size of a data block in bytes. Must be a power of two between 4096 (4k) and 1048576 (1 MiB).
frag_count: u32The number of entries in the fragment table.
compressor: CompressorCompressor used for data
block_log: u16The log2 of the block size. If the two fields do not agree, the archive is considered corrupted.
flags: u16Bit wise OR of the flag bits
id_count: u16The number of entries in the ID lookup table.
version_major: u16Major version of the format. Must be set to 4.
version_minor: u16Minor version of the format. Must be set to 0.
root_inode: u64A reference to the inode of the root directory.
bytes_used: u64The number of bytes used by the archive. Because SquashFS archives must be padded to a multiple of the underlying device block size, this can be less than the actual file size.
id_table: u64§xattr_table: u64§inode_table: u64§dir_table: u64§frag_table: u64§export_table: u64Implementations§
Source§impl SuperBlock
impl SuperBlock
Sourcepub fn inodes_uncompressed(&self) -> bool
pub fn inodes_uncompressed(&self) -> bool
flag value
Sourcepub fn data_block_stored_uncompressed(&self) -> bool
pub fn data_block_stored_uncompressed(&self) -> bool
flag value
Sourcepub fn fragments_stored_uncompressed(&self) -> bool
pub fn fragments_stored_uncompressed(&self) -> bool
flag value
Sourcepub fn fragments_are_not_used(&self) -> bool
pub fn fragments_are_not_used(&self) -> bool
flag value
Sourcepub fn fragments_are_always_generated(&self) -> bool
pub fn fragments_are_always_generated(&self) -> bool
flag value
Sourcepub fn data_has_been_deduplicated(&self) -> bool
pub fn data_has_been_deduplicated(&self) -> bool
flag value
Sourcepub fn nfs_export_table_exists(&self) -> bool
pub fn nfs_export_table_exists(&self) -> bool
flag value
Sourcepub fn xattrs_are_stored_uncompressed(&self) -> bool
pub fn xattrs_are_stored_uncompressed(&self) -> bool
flag value
Sourcepub fn no_xattrs_in_archive(&self) -> bool
pub fn no_xattrs_in_archive(&self) -> bool
flag value
Sourcepub fn compressor_options_are_present(&self) -> bool
pub fn compressor_options_are_present(&self) -> bool
flag value
Source§impl SuperBlock
impl SuperBlock
pub fn new(compressor: Compressor, kind: Kind) -> Self
Trait Implementations§
Source§impl Clone for SuperBlock
impl Clone for SuperBlock
Source§fn clone(&self) -> SuperBlock
fn clone(&self) -> SuperBlock
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SuperBlock
impl Debug for SuperBlock
Source§impl DekuReader<'_, ([u8; 4], u16, u16, Endian)> for SuperBlock
impl DekuReader<'_, ([u8; 4], u16, u16, Endian)> for SuperBlock
Source§impl DekuUpdate for SuperBlock
impl DekuUpdate for SuperBlock
Source§impl DekuWriter<([u8; 4], u16, u16, Endian)> for SuperBlock
impl DekuWriter<([u8; 4], u16, u16, Endian)> for SuperBlock
Source§impl PartialEq for SuperBlock
impl PartialEq for SuperBlock
impl Copy for SuperBlock
impl Eq for SuperBlock
impl StructuralPartialEq for SuperBlock
Auto Trait Implementations§
impl Freeze for SuperBlock
impl RefUnwindSafe for SuperBlock
impl Send for SuperBlock
impl Sync for SuperBlock
impl Unpin for SuperBlock
impl UnwindSafe for SuperBlock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more