Import with #import "std/zip".
ZipEntry :: struct { data_start: u64; compressed_size: u64; size: u64; crc32: u32; method: u32; found: bool; }ZipDirectory :: struct { start: u64; end: u64; cursor: u64; count: u64; index: u64; valid: bool; }ZipNamedEntry :: struct { directory: ZipDirectory; entry: ZipEntry; name_start: u64; name_size: u64; valid: bool; }ZipWriteItem :: struct { name_start: u64; name_size: u64; data_start: u64; data_size: u64; }ZipU16 :: (bytes: []u8, at: u64) -> u32ZipU32 :: (bytes: []u8, at: u64) -> u32ZipNameEqual :: (bytes: []u8, at: u64, size: u64, wanted: string) -> boolOpenZipDirectory :: (bytes: []u8) -> ZipDirectoryZipNamesMatch :: (bytes: []u8, first: u64, second: u64, size: u64) -> boolNextZipEntry :: (bytes: []u8, directory: ZipDirectory) -> ZipNamedEntryOn malformed input, both the returned record and the cursor become invalid.
FindZipEntry :: (bytes: []u8, wanted: string) -> ZipEntryA missing or invalid entry has found=false. Duplicate names are invalid.
ZipCRC32Update :: (crc_start: u32, bytes: []u8) -> u32ZipCRC32 :: (bytes: []u8) -> u32CopyStoredZipEntry :: (bytes: []u8, entry: ZipEntry, output: []u8) -> boolZipPut16 :: (output: []u8, at: u64, value: u32)ZipPut32 :: (output: []u8, at: u64, value: u32)StoredZipSize :: (input: []u8, items: []ZipWriteItem) -> u64Returns the exact output size or zero when classic ZIP limits are exceeded.
ZipCopyBytes :: (output: []u8, at: u64, input: []u8, input_at: u64, size: u64)ZipCRC32Range :: (bytes: []u8, at: u64, size: u64) -> u32WriteStoredZip :: (output: []u8, input: []u8, items: []ZipWriteItem) -> u64Writes uncompressed ZIP entries into caller-owned memory. An app can choose compression separately; this keeps the archive format portable and usable even where no native compression library is installed.