#[repr(C)]pub struct SqshConfig {
pub archive_offset: u64,
pub source_size: u64,
pub source_mapper: *const SqshMemoryMapperImpl,
pub mapper_block_size: c_int,
pub mapper_lru_size: c_int,
pub compression_lru_size: c_int,
pub max_symlink_depth: usize,
pub _reserved: [c_char; 128],
}Expand description
The SqshConfig struct contains all the configuration options for a sqsh session.
Fields§
§archive_offset: u64represents the offset in bytes where the sqsh_archive will start.
source_size: u64represents the addressable size of the source in bytes.
Please note that this is not the size of the archive, but the size of the
source. So that the maximal size of the archive is source_size - archive_offset.
This field is only used when the source_mapper is unable to determine the size of the source itself. This is the case for the following mappers:
sqsh_mapper_impl_static
source_mapper: *const SqshMemoryMapperImplsource_mapper is the memory mapper implementation that will be used to map the archive.
sqsh_mapper_impl_mmap: the archive will be loaded from a file. The source will be interpreted as a file path. this is the default.sqsh_mapper_impl_static: the archive will be interpreted from a static buffer.sqsh_mapper_impl_curl: the archive will be loaded from a remote location. The source will be interpreted as a URL.
mapper_block_size: c_intthe block size used to retrieve chunks of data from the mapper. If unset or 0, the block size will be determined by the mapper.
mapper_lru_size: c_intthe size of the LRU cache used to cache chunks of data from the mapper. If unset or 0, the LRU defaults to 32. if set to -1, the LRU will be disabled.
compression_lru_size: c_intthe size of the LRU cache used to cache chunks of data from the compression algorithm. If unset or 0, the LRU defaults to 128. if set to -1, the LRU will be disabled.
max_symlink_depth: usizethe maximum depth of symlinks that will be followed. If unset or 0, the max symlink depth will be 100.
_reserved: [c_char; 128]Trait Implementations§
Source§impl Clone for SqshConfig
impl Clone for SqshConfig
Source§fn clone(&self) -> SqshConfig
fn clone(&self) -> SqshConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more