larian_formats/
lspk.rs

1mod read;
2mod write;
3
4const ID_BYTES: [u8; 4] = [b'L', b'S', b'P', b'K'];
5
6const MIN_SUPPORTED_VERSION: u32 = 18;
7
8const TABLE_ENTRY_PATH_LENGTH: usize = 256;
9
10/// The table entry for each file compressed into the LSPK file will decompress into exactly this
11/// number of bytes, padded with trailling 0s to fill any that aren't needed.
12#[allow(clippy::identity_op)]
13const DECOMPRESSED_TABLE_ENTRY_LENGTH: usize = 0
14    + TABLE_ENTRY_PATH_LENGTH // Relative path of the decompressed file (padded with trailing 0s)
15    + 8   // Offset from the start of the file to the compressed file bytes
16    + 4   // Number of compressed file bytes
17    + 4   // Number of decompressed file byte.
18;
19
20pub use self::{
21    read::{
22        entry_from_zipfile, DecompressedFile, DecompressedLspk, DecompressedLspkZip, LspkParser,
23        Reader,
24    },
25    write::Writer,
26};