zipfile
ZIP Archive Format (Stored Only)
Functions
| Function | Description |
|---|---|
_zip_byte_at | Internal byte reader. |
_zip_w16 | Internal: write little-endian 16-bit. |
_zip_w32 | Internal: write little-endian 32-bit. |
_zip_r16 | Internal: read little-endian 16-bit. |
_zip_r32 | Internal: read little-endian 32-bit. |
_zip_crc32_byte | Simple CRC-32 for ZIP (same algorithm as gzip). |
_zip_crc32 | Compute CRC-32 for data. |
zip_create | Create a write handle. |
zip_add | Add a stored file entry to the ZIP. |
zip_finish | Write central directory and EOCD. Returns total archive length. |
_zip_find_eocd | Internal: scan for EOCD to find central directory. |
zip_open | Open a ZIP archive for reading. |
zip_count | Number of entries in the ZIP. |
zip_entry_name | Copy entry name at index to out. Returns length. |
zip_entry_size | Get data size for entry at index. |
zip_entry_data | Copy entry data at index to out. Returns length. |
Details
_zip_byte_at
fn _zip_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader.
_zip_w16
fn _zip_w16(out: &i8, pos: i64, val: i64) -> i64Internal: write little-endian 16-bit.
_zip_w32
fn _zip_w32(out: &i8, pos: i64, val: i64) -> i64Internal: write little-endian 32-bit.
_zip_r16
fn _zip_r16(buf: &i8, pos: i64) -> i64Internal: read little-endian 16-bit.
_zip_r32
fn _zip_r32(buf: &i8, pos: i64) -> i64Internal: read little-endian 32-bit.
_zip_crc32_byte
fn _zip_crc32_byte(crc: i64, byte_val: i64) -> i64Simple CRC-32 for ZIP (same algorithm as gzip).
_zip_crc32
fn _zip_crc32(buf: &i8, len: i64) -> i64Compute CRC-32 for data.
zip_create
fn zip_create(out: &i8) -> &i64Create a write handle.
zip_add
fn zip_add(h: &i64, name: &i8, nlen: i64, data: &i8, dlen: i64) -> i64Add a stored file entry to the ZIP.
zip_finish
fn zip_finish(h: &i64) -> i64Write central directory and EOCD. Returns total archive length.
_zip_find_eocd
fn _zip_find_eocd(buf: &i8, len: i64) -> i64Internal: scan for EOCD to find central directory.
zip_open
fn zip_open(buf: &i8, len: i64) -> &i64Open a ZIP archive for reading.
zip_count
fn zip_count(h: &i64) -> i64Number of entries in the ZIP.
zip_entry_name
fn zip_entry_name(h: &i64, idx: i64, out: &i8) -> i64Copy entry name at index to out. Returns length.
zip_entry_size
fn zip_entry_size(h: &i64, idx: i64) -> i64Get data size for entry at index.
zip_entry_data
fn zip_entry_data(h: &i64, idx: i64, out: &i8) -> i64Copy entry data at index to out. Returns length.