Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

find_chunk

Function find_chunk 

Source
pub fn find_chunk(
    bytes: &[u8],
    header: &PackHeader,
    chunk_id: u32,
) -> Option<PackEntry>
Expand description

Linear-scan the table for chunk_id. Same slice contract as parse_entry. Packs are written sorted by id unless an explicit order file reorders them, so callers doing many lookups should build their own cache (hl-psx keeps a 512-entry table) rather than rescanning.