Skip to main content

parse_segments

Function parse_segments 

Source
pub fn parse_segments(metadata: &[u8], block_size: usize) -> Vec<SegmentEntry>
Expand description

Parse the segment-descriptor (0x0305) block from decrypted metadata, returning the (logical→physical) segment entries.

Finds the first 0x0305 block in metadata, reads its entry count (capped), and decodes each 40-byte entry. Returns an empty vector if no segment-descriptor block is present (a per-artifact miss).