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 (5)
Constants (3)
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
- 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
- compress (procedure groups)
Constants
BLOCK_MAGIC ¶
BLOCK_MAGIC :: u64(0x314159265359)
BZIP2_INTERLEAVE ¶
BZIP2_INTERLEAVE :: 4
END_MAGIC ¶
END_MAGIC :: u64(0x177245385090)
Variables
This section is empty.
Procedures
compress_to_dynamic ¶
compress_to_dynamic :: proc( output: ^[dynamic]u8, input: []u8, level: Level = Level.Default, allocator := context.allocator, ) -> (err: compress.Error) {…}
decompress_from_context ¶
decompress_from_context :: proc( z: ^compress.Context, expected_output_size: int = -1, max_output_size: int = compress.COMPRESS_OUTPUT_ALLOCATE_MAX, allocator := context.allocator, ) -> (err: compress.Error) {…}
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-08 00:08:02.025371000 +0000 UTC