xz_dec_microlzma_run(9)
β¨ NAME β¨
xz_dec_microlzma_run β run the MicroLZMA decoder, bestie. This is the Kernel API Manual page for it, and yes, we're getting into it.
π SYNOPSIS π
enum xz_ret xz_dec_microlzma_run (struct xz_dec_microlzma *s , struct
xz_buf *b );
π«Ά ARGUMENTS π«Ά
sβ the decoder state, initialized usingxz_dec_microlzma_reset. Like, it has to be set up first, okay?bβ the input and output buffers. The whole data situation.
π DESCRIPTION π
Okay so this works similarly to xz_dec_run, but with a few important differences. Only the differences are documented here β no extra lore.
The only possible return values are XZ_OK, XZ_STREAM_END, and XZ_DATA_ERROR. This function cannot return XZ_BUF_ERROR: if no progress is possible due to lack of input data or output space, this function will keep returning XZ_OK. So the calling code has to be written so that it will eventually provide input and output space matching (or exceeding) the comp_size and uncomp_size arguments given to xz_dec_microlzma_reset. If the caller cannot do this (for example, if the input file is truncated or otherwise corrupt), the caller must detect this error by itself to avoid an infinite loop. No infinite-loop era, bestie β that's not the vibe.
If the compressed data seems to be corrupt, XZ_DATA_ERROR is returned. This can happen also when incorrect dictionary, uncompressed, or compressed sizes have been specified. So double-check those sizes, okay?
With XZ_PREALLOC only: As an extra feature, b->out may be NULL to skip over uncompressed data. This way the caller doesn't need to provide a temporary output buffer for the bytes that will be ignored. Lowkey iconic.
With XZ_SINGLE only: In contrast to xz_dec_run, the return value XZ_OK is also possible and thus XZ_SINGLE is actually a limited multi-call mode. After XZ_OK the bytes decoded so far may be read from the output buffer. It is possible to continue decoding but the variables b->out and b->out_pos MUST NOT be changed by the caller. Increasing the value of b->out_size is allowed to make more output space available; one doesn't need to provide space for the whole uncompressed data on the first call. The input buffer may be changed normally like with XZ_PREALLOC. This way input data can be provided from non-contiguous memory.
π SEE ALSO π
Kernel file ./include/linux/xz.h β plus the whole friend group:
enum xz_mode(9)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_end(9)
okay that's the whole page, bestie. from source/version ./include/linux, dated October 2026, page xz_dec_microlzma_run(9) β mwah π
π¦ 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