A collection of utilities to aid with other `compress`ion packages.

Collection Info

View Source
Collection
core
Path
compress
Entries
48

Source Files

Constants

2

COMPRESS_OUTPUT_ALLOCATE_MAX #

Source
COMPRESS_OUTPUT_ALLOCATE_MAX :: int(#config(COMPRESS_OUTPUT_ALLOCATE_MAX, 1 << 32))

For 64-bit platforms, we set the default max buffer size to 4 GiB, which is GZIP and PKZIP's max payload size.

COMPRESS_OUTPUT_ALLOCATE_MIN #

Source
COMPRESS_OUTPUT_ALLOCATE_MIN :: int(#config(COMPRESS_OUTPUT_ALLOCATE_MIN, 1 << 20))

When a decompression routine doesn't stream its output, but writes to a buffer, we pre-allocate an output buffer to speed up decompression. The default is 1 MiB.

Types

8

Procedures

27

peek_back_byte #

Source
@(optimization_mode="favor_size")
peek_back_byte :: proc(z: ^$C, offset: i64) -> (res: u8, err: Error) {…}

Sliding window read back

read_u8_prefer_code_buffer_lsb #

Source
@(optimization_mode="favor_size")
read_u8_prefer_code_buffer_lsb :: proc(z: ^$C) -> (res: u8, err: Error) {…}

You would typically only use this at the end of Inflate, to drain bits from the code buffer preferentially.

Procedure Groups

11