ENUM XZ_MODE(9)
π enum xz_mode(9) β Kernel API Manual β¨
okay bestie, welcome to the glow-up of enum xz_mode, straight out of the Kernel API Manual at ./include/linux. bestie. it's giving "three modes, one enum, zero chill." let's get into it π
β¨ NAME β¨
enum xz_mode β Operation mode. that's it, that's the whole vibe check π
π¦ SYNOPSIS π¦
enum xz_mode {
XZ_SINGLE ,
XZ_PREALLOC ,
XZ_DYNALLOC
};
look at her. three little constants, living their best lives, in that exact order, no notes π
πΈ CONSTANTS πΈ
XZ_SINGLEβ Single-call mode, aka the low-calorie option π₯ she uses less RAM than the multi-call modes, because the LZMA2 dictionary does not need to be allocated as part of the decoder state. everything required is allocated at initialization, soxz_dec_runcannot returnXZ_MEM_ERROR. no cap, she's lightweight and she knows it.XZ_PREALLOCβ Multi-call mode with a preallocated LZMA2 dictionary buffer β¨ all data structures get allocated at initialization, soxz_dec_runcannot returnXZ_MEM_ERROR. pre-planned, pre-buffered, pre-slay πXZ_DYNALLOCβ Multi-call mode, the spontaneous main character π the LZMA2 dictionary gets allocated once the required size has been parsed from the stream headers. and if that allocation fails?xz_dec_runwill returnXZ_MEM_ERROR. so like, she can fail, and that's just her truth π
π§ DESCRIPTION π§
so here's the tea π: you can enable support for only a subset of the above modes at compile time by defining XZ_DEC_SINGLE, XZ_DEC_PREALLOC, or XZ_DEC_DYNALLOC. mix and match, chef's kiss, whatever your little heart desires π
the xz_dec kernel module is always compiled with support for all operation modes β she's the full package, no cuts π₯ but the preboot code may be built with fewer features to minimize code size. different stage of life, different priorities, iykyk π
π₯ SEE ALSO π₯
Kernel file ./include/linux/xz.h and honestly the whole friend group: enum xz_ret(9), struct xz_buf(9), xz_dec_init(9), xz_dec_run(9), xz_dec_reset(9), xz_dec_end(9), MicroLZMA decompressor(9), xz_dec_microlzma_alloc(9), xz_dec_microlzma_reset(9), xz_dec_microlzma_run(9), xz_dec_microlzma_end(9). go say hi to all of them, they're iconic π«Ά
and that's the page, bestie π brought to you from ./include/linux, dated October 2026, filed under enum xz_mode(9) in the Kernel API Manual. go forth and decode. periodt β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms