gzip
Gzip Format (Stored Blocks Only)
Functions
| Function | Description |
|---|---|
_gz_byte_at | Internal byte reader. |
_gz_crc32_byte | CRC-32 table (precomputed for polynomial 0xEDB88320). We compute it on-the-fl… |
gzip_crc32 | Compute CRC-32 of buffer. |
_gz_write16 | Internal: write little-endian 16-bit value. |
_gz_write32 | Internal: write little-endian 32-bit value. |
_gz_read32 | Internal: read little-endian 32-bit value. |
gzip_compress | Compress data with gzip stored-block format. Returns output length. |
gzip_is_gzip | Check if buffer starts with gzip magic bytes. |
gzip_orig_size | Read original size from gzip trailer (last 4 bytes). |
gzip_decompress | Decompress gzip stored-block data. Returns output length. |
Details
_gz_byte_at
fn _gz_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader.
_gz_crc32_byte
fn _gz_crc32_byte(crc: i64, byte_val: i64) -> i64CRC-32 table (precomputed for polynomial 0xEDB88320). We compute it on-the-fly per byte.
gzip_crc32
fn gzip_crc32(buf: &i8, len: i64) -> i64Compute CRC-32 of buffer.
_gz_write16
fn _gz_write16(out: &i8, pos: i64, val: i64) -> i64Internal: write little-endian 16-bit value.
_gz_write32
fn _gz_write32(out: &i8, pos: i64, val: i64) -> i64Internal: write little-endian 32-bit value.
_gz_read32
fn _gz_read32(buf: &i8, pos: i64) -> i64Internal: read little-endian 32-bit value.
gzip_compress
fn gzip_compress(input: &i8, in_len: i64, out: &i8) -> i64Compress data with gzip stored-block format. Returns output length.
gzip_is_gzip
fn gzip_is_gzip(buf: &i8, len: i64) -> i64Check if buffer starts with gzip magic bytes.
gzip_orig_size
fn gzip_orig_size(buf: &i8, len: i64) -> i64Read original size from gzip trailer (last 4 bytes).
gzip_decompress
fn gzip_decompress(input: &i8, in_len: i64, out: &i8) -> i64Decompress gzip stored-block data. Returns output length.