package core:compress/lzma
⌘K
Ctrl+K
or
/
Overview
An implementation of the LZMA and LZMA2 compression methods
Reads and writes .lzma files, raw LZMA streams as stored in 7z and zip (method 14),
and raw LZMA2 streams as used by xz and 7z.
It is a port of Igor Pavlov's public domain LZMA SDK, and the encoder's output is byte-identical to the SDK's.
Index
Variables (0)
This section is empty.
Procedures (19)
Procedure Groups (6)
Types
Error ¶
Error :: compress.Error
Related Procedures With Returns
- compress_lzma2_to_dynamic
- compress_lzma2_to_slice
- compress_raw_to_dynamic
- compress_raw_to_slice
- compress_to_dynamic
- compress_to_slice
- decode_properties
- decompress_from_bytes
- decompress_from_context
- decompress_lzma2_from_bytes
- decompress_lzma2_from_context
- decompress_raw_from_bytes
- decompress_raw_from_context
- lzma2_dict_size
- compress (procedure groups)
- compress_lzma2 (procedure groups)
- compress_raw (procedure groups)
- decompress (procedure groups)
- decompress_lzma2 (procedure groups)
- decompress_raw (procedure groups)
General_Error ¶
General_Error :: compress.General_Error
LZMA_Error ¶
LZMA_Error :: compress.LZMA_Error
Level ¶
Level :: enum i32 { Level_0 = 0, 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_0, Default = Level_6, Best = Level_9, }
Related Procedures With Parameters
- compress_to_dynamic
- compress_to_slice
- level_options
- compress (procedure groups)
Match_Finder_Kind ¶
Match_Finder_Kind :: enum u8 { HC4, HC5, BT2, BT3, BT4, BT5, }
Options ¶
Options :: struct { lc: u8, lp: u8, pb: u8, dict_size: u32, fast: bool, nice_len: u32, depth: u32, match_finder: Match_Finder_Kind, end_marker: bool, }
Related Procedures With Parameters
- compress_lzma2_to_dynamic
- compress_lzma2_to_slice
- compress_raw_to_dynamic
- compress_raw_to_slice
- compress_lzma2 (procedure groups)
- compress_raw (procedure groups)
Properties ¶
Related Procedures With Parameters
- decompress_raw_from_bytes
- decompress_raw_from_context
- encode_properties
- decompress_raw (procedure groups)
Related Procedures With Returns
- compress_lzma2_to_dynamic
- compress_lzma2_to_slice
- compress_raw_to_dynamic
- compress_raw_to_slice
- decode_properties
- compress_lzma2 (procedure groups)
- compress_raw (procedure groups)
Related Constants
Constants
DEFAULT_PROPERTIES ¶
DEFAULT_PROPERTIES :: Properties{lc = 3, lp = 0, pb = 2, dict_size = 8 << 20}
DICT_SIZE_MIN ¶
DICT_SIZE_MIN :: 1 << 12
HEADER_SIZE ¶
HEADER_SIZE :: PROPERTIES_SIZE + 8
LC_MAX ¶
LC_MAX :: 8
LP_MAX ¶
LP_MAX :: 4
LZMA2_DICT_PROP_MAX ¶
LZMA2_DICT_PROP_MAX :: 40
LZMA2_LCLP_MAX ¶
LZMA2_LCLP_MAX :: 4
PB_MAX ¶
PB_MAX :: 4
PROPERTIES_SIZE ¶
PROPERTIES_SIZE :: 5
UNKNOWN_SIZE ¶
UNKNOWN_SIZE: u64 : max(u64)
Variables
This section is empty.
Procedures
compress_lzma2_to_dynamic ¶
compress_lzma2_to_dynamic :: proc( output: ^[dynamic]u8, input: []u8, options: Options, allocator := context.allocator, ) -> (props: Properties, err: compress.Error) {…}
compress_lzma2_to_slice ¶
compress_lzma2_to_slice :: proc( output, input: []u8, options: Options, allocator := context.allocator, ) -> (written: int, props: Properties, err: compress.Error) {…}
compress_raw_to_dynamic ¶
compress_raw_to_dynamic :: proc( output: ^[dynamic]u8, input: []u8, options: Options, allocator := context.allocator, ) -> (props: Properties, err: compress.Error) {…}
compress_raw_to_slice ¶
compress_raw_to_slice :: proc( output, input: []u8, options: Options, allocator := context.allocator, ) -> (written: int, props: Properties, err: compress.Error) {…}
compress_to_dynamic ¶
compress_to_dynamic :: proc( output: ^[dynamic]u8, input: []u8, level: Level = Level.Default, allocator := context.allocator, ) -> (err: compress.Error) {…}
compress_to_slice ¶
compress_to_slice :: proc( output, input: []u8, level: Level = Level.Default, allocator := context.allocator, ) -> (written: int, err: compress.Error) {…}
decode_properties ¶
decode_properties :: proc "contextless" (data: []u8) -> (props: Properties, 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) {…}
decompress_raw_from_bytes ¶
decompress_raw_from_bytes :: proc( output: ^[dynamic]u8, input: []u8, props: Properties, expected_output_size: int = -1, max_output_size: int = compress.COMPRESS_OUTPUT_ALLOCATE_MAX, allocator := context.allocator, ) -> (err: compress.Error) {…}
decompress_raw_from_context ¶
decompress_raw_from_context :: proc( z: ^compress.Context, props: Properties, expected_output_size: int = -1, max_output_size: int = compress.COMPRESS_OUTPUT_ALLOCATE_MAX, allocator := context.allocator, ) -> (err: compress.Error) {…}
encode_properties ¶
encode_properties :: proc "contextless" (props: Properties) -> (data: [5]u8) {…}
Procedure Groups
compress ¶
compress :: proc{ compress_to_slice, compress_to_dynamic, }
compress_lzma2 ¶
compress_lzma2 :: proc{ compress_lzma2_to_slice, compress_lzma2_to_dynamic, }
compress_raw ¶
compress_raw :: proc{ compress_raw_to_slice, compress_raw_to_dynamic, }
decompress ¶
decompress :: proc{ decompress_from_bytes, decompress_from_context, }
decompress_lzma2 ¶
decompress_lzma2 :: proc{ decompress_lzma2_from_bytes, decompress_lzma2_from_context, }
decompress_raw ¶
decompress_raw :: proc{ decompress_raw_from_bytes, decompress_raw_from_context, }
Source Files
Generation Information
Generated with odin version dev-2026-11 (vendor "odin") Windows_amd64 @ 2026-11-10 03:07:04.374188700 +0000 UTC