package core:compress/bzip2
⌘K
Ctrl+K
or
/
Overview
An implementation of the BZIP2 compression method
The compressor is derived from libbzip2 by Julian R Seward.
Its compatible license can be found in LICENSE-libbzip2
Index
Types (7)
Constants (4)
Variables (0)
This section is empty.
Procedure Groups (2)
Types
BZip2 ¶
BZip2 :: struct { block: [900034]u8, ptr: [900000]u32, work: [900034]u32, ftab: [65537]u32, nblock: int, nblock_max: int, orig_ptr: int, n_in_use: int, n_mtf: int, in_ch: u32, in_len: int, out: []u8, out_pos: int, bits: u64, live: uint, in_use: [256]bool, unseq_to_seq: [256]u8, mtf_freq: [258]i32, lengths: [6][258]u8, codes: [6][258]u32, rfreq: [6][258]i32, len_pack: [258][3]u32, selector: [18002]u8, selector_mtf: [18002]u8, }
Related Procedures With Parameters
- compress_to_slice
- compress (procedure groups)
BZip2_Error ¶
BZip2_Error :: compress.BZip2_Error
Error ¶
Error :: compress.Error
Related Procedures With Returns
- compress_to_dynamic
- compress_to_slice
- decompress_from_bytes
- decompress_from_context
- decompress_to_writer
- reader_init
- reader_read
- writer_finish
- writer_init
- writer_write
- compress (procedure groups)
- decompress (procedure groups)
General_Error ¶
General_Error :: compress.General_Error
Level ¶
Level :: enum i32 { Level_1 = 1, Level_2 = 2, Level_3 = 3, Level_4 = 4, Level_5 = 5, Level_6 = 6, Level_7 = 7, Level_8 = 8, Level_9 = 9, Fastest = Level_1, Default = Level_9, Best = Level_9, }
Related Procedures With Parameters
- compress_to_dynamic
- compress_to_slice
- writer_init
- compress (procedure groups)
Reader ¶
Reader :: struct { z: ^compress.Context, window: []u8, written: int, flushed: int, limit: i64, total: i64, total_in: i64, total_out: i64, br: BZip2_Bit_Reader, decoder: ^BZip2_Decoder, tts: [4][]u32, scratch: [4][]u8, pending: [4]BZip2_Pending, count: int, interleave: int, nblock_max: int, emit: int, emit_pos: int, run: int, memory_max: int, streams: int, crc: u32, combined: u32, stream_crc: u32, deferred: compress.Error, err: compress.Error, allocator: runtime.Allocator, options: compress.Options, state: BZip2_Stream_State, after: BZip2_Stream_State, run_byte: u8, walked: bool, randomised: bool, done: bool, owns_window: bool, }
Related Procedures With Parameters
Writer ¶
Writer :: struct { w: io.Stream, state: ^BZip2, out: []u8, total: i64, done: i64, flushed: i64, crc: u32, combined: u32, err: compress.Error, allocator: runtime.Allocator, options: compress.Options, carried: u8, finished: bool, owns_out: bool, }
Related Procedures With Parameters
Constants
BLOCK_MAGIC ¶
BLOCK_MAGIC :: u64(0x314159265359)
BZIP2_INTERLEAVE ¶
BZIP2_INTERLEAVE :: 4
CHUNK_SIZE ¶
CHUNK_SIZE :: 256 * 1024
END_MAGIC ¶
END_MAGIC :: u64(0x177245385090)
Variables
This section is empty.
Procedures
decompress_from_context ¶
decompress_from_context :: proc( z: ^compress.Context, expected_output_size: int = -1, options: compress.Options = {}, allocator := context.allocator, ) -> (err: compress.Error) {…}
reader_destroy ¶
reader_destroy :: proc(r: ^Reader) {…}
writer_destroy ¶
writer_destroy :: proc(bw: ^Writer) {…}
Procedure Groups
compress ¶
compress :: proc{ compress_to_slice, compress_to_dynamic, }
decompress ¶
decompress :: proc{ decompress_from_bytes, decompress_from_context, }
Source Files
Generation Information
Generated with odin version dev-2026-11 (vendor "odin") Windows_amd64 @ 2026-11-28 21:05:09.772358800 +0000 UTC