pub struct CompactAllocationIndex {
pub count: u32,
pub records_start_offset: u64,
pub relative_offsets: Vec<u32>,
pub record_sizes: Vec<u16>,
pub quick_filter_data: Option<QuickFilterData>,
}
Expand description
Compact allocation index using relative offsets and compressed data
Fields§
§count: u32
Total number of allocation records
records_start_offset: u64
Absolute offset where allocation records start
relative_offsets: Vec<u32>
Relative offsets from records_start_offset (saves memory)
record_sizes: Vec<u16>
Size of each record in bytes (most records are < 64KB)
quick_filter_data: Option<QuickFilterData>
Quick filtering data for large files (optional)
Implementations§
Source§impl CompactAllocationIndex
impl CompactAllocationIndex
Sourcepub fn add_record(
&mut self,
absolute_offset: u64,
size: u16,
) -> Result<(), BinaryExportError>
pub fn add_record( &mut self, absolute_offset: u64, size: u16, ) -> Result<(), BinaryExportError>
Add a record to the index
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get memory usage of this index in bytes
Trait Implementations§
Source§impl Clone for CompactAllocationIndex
impl Clone for CompactAllocationIndex
Source§fn clone(&self) -> CompactAllocationIndex
fn clone(&self) -> CompactAllocationIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CompactAllocationIndex
impl Debug for CompactAllocationIndex
Source§impl Default for CompactAllocationIndex
impl Default for CompactAllocationIndex
Source§fn default() -> CompactAllocationIndex
fn default() -> CompactAllocationIndex
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompactAllocationIndex
impl<'de> Deserialize<'de> for CompactAllocationIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompactAllocationIndex
impl RefUnwindSafe for CompactAllocationIndex
impl Send for CompactAllocationIndex
impl Sync for CompactAllocationIndex
impl Unpin for CompactAllocationIndex
impl UnwindSafe for CompactAllocationIndex
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
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>
Converts
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>
Converts
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