Struct infinite_rs::module::block::ModuleBlockEntry

source ·
pub struct ModuleBlockEntry {
    pub compressed_offset: i32,
    pub compressed_size: i32,
    pub decompressed_offset: i32,
    pub decompressed_size: i32,
    pub is_compressed: bool,
}
Expand description

Module block containing info relating to Kraken compression. Is used to determine how to read bytes in module_file.

Caution: Max size is 2GBs, engine limitation.

Fields§

§compressed_offset: i32

Offset of compressed data inside module (after file_data_offset in module).

§compressed_size: i32

Size in bytes of compressed data inside module.

§decompressed_offset: i32

Offset of decompressed data inside decompression buffer.

§decompressed_size: i32

Size in bytes of decompression buffer.

§is_compressed: bool

Boolean indicating if block is compressed or not. Tags can be made up of both compressed and decompressed blocks.

Trait Implementations§

source§

impl Debug for ModuleBlockEntry

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ModuleBlockEntry

source§

fn default() -> ModuleBlockEntry

Returns the “default value” for a type. Read more
source§

impl Readable for ModuleBlockEntry

source§

fn read<R: BufRead>(&mut self, reader: &mut R) -> Result<()>

Reads the module block entry data from the provided buffered reader.

§Arguments
  • reader - A mutable reference to a BufReader<File> from which to read the data.
§Returns

Returns Ok(()) if the read operation is successful, or an Err containing the I/O error if any reading operation fails.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.