pub struct LfoFileHeader {
pub magic: u32,
pub unk_cst1: u16,
pub comp_format: u16,
pub payload_size: u32,
pub data_hash: [u8; 32],
pub cur_payload_size: u32,
pub cur_state: u16,
pub unk: u16,
}Expand description
Reproduces the internal format of the LFO file headers, as used by the official client If you just care about downloading a file, you probably don’t need to look at this struct.
Fields§
§magic: u32Constant value (“RHDL”)
unk_cst1: u16Unclear, I have only seen the constant value 1 passed around
comp_format: u16See CompressionFormats for known values
payload_size: u32The size of the requested file data, after any decompression
data_hash: [u8; 32]Sha256 hash of the final data, without LFO header and after any decompression
cur_payload_size: u32In the official client, this field gets updated as it receives more data. You should ignore this field.
cur_state: u16In the official client, this starts at 1, goes up to 5 as we continue downloading. Ignore this field.
unk: u16This field is physically present in LFO headers, but its purpose has not been documented.
Trait Implementations§
Source§impl Clone for LfoFileHeader
impl Clone for LfoFileHeader
Source§fn clone(&self) -> LfoFileHeader
fn clone(&self) -> LfoFileHeader
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 LfoFileHeader
impl Debug for LfoFileHeader
Source§impl PartialEq for LfoFileHeader
impl PartialEq for LfoFileHeader
Source§impl TryFrom<&[u8]> for LfoFileHeader
impl TryFrom<&[u8]> for LfoFileHeader
impl Copy for LfoFileHeader
impl Eq for LfoFileHeader
impl StructuralPartialEq for LfoFileHeader
Auto Trait Implementations§
impl Freeze for LfoFileHeader
impl RefUnwindSafe for LfoFileHeader
impl Send for LfoFileHeader
impl Sync for LfoFileHeader
impl Unpin for LfoFileHeader
impl UnwindSafe for LfoFileHeader
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