xz_dec_microlzma_reset(9)
π
xz_dec_microlzma_reset β a Kernel API Manual moment π
okay so bestie, welcome to the Kernel API Manual, and today's main character is xz_dec_microlzma_reset β¨ β the little function that hits the reset button on your MicroLZMA decoder state so it's fresh and ready to slay again π
β¨ NAME β¨
xz_dec_microlzma_reset β reset the MicroLZMA decoder state π no cap, that's literally the whole vibe.
πΈ SYNOPSIS πΈ
void xz_dec_microlzma_reset (struct xz_dec_microlzma *s , uint32_t
comp_size , uint32_t uncomp_size , int uncomp_size_is_exact );
she takes four things and returns absolutely nothing (void era, we love a function that gives nothing back but still serves π
). the exact signature, character for character:
void xz_dec_microlzma_reset(struct xz_dec_microlzma *s,
uint32_t comp_size,
uint32_t uncomp_size,
int uncomp_size_is_exact);
π¦ ARGUMENTS π¦
sβ the decoder state, bestie. and not just any decoder state: one that was allocated usingxz_dec_microlzma_alloc. don't be out here passing random garbage, that's not the vibe πcomp_sizeβ the compressed size of the input stream ποΈ i.e. how big the squeeze is.uint32_t, obviously.uncomp_sizeβ the uncompressed size of the input stream π now listen closely because this one has lore:- you can pass a value smaller than the real uncompressed size of the input stream, but only if
uncomp_size_is_exactis set tofalse. lowkey a loophole, highkey documented. - but you can never set
uncomp_sizeto a value larger than the expected real uncompressed size π because that would eventually result inXZ_DATA_ERROR. not a cute error. aXZ_DATA_ERRORerror. avoid π
- you can pass a value smaller than the real uncompressed size of the input stream, but only if
uncomp_size_is_exactβ ok so this one is anintinstead of aboolpurely to avoid requiringstdbool.hπ«Ά iconic C decision-making, honestly. it should normally be set totrueβ. and when you set it tofalse, error detection is weaker. weaker!! so likeβ¦ tread carefully, bestie π
fr fr:true= tight error detection.false= the vibes are loose and so is the validation. choose wisely π
π SEE ALSO π
go read these next, they're all in the ./include/linux/xz.h kernel file and they're all part of the same 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_run(9)xz_dec_microlzma_end(9)
π sign-off π
that's the whole page, bestie π this little gem lives over in ./include/linux, it's dated October 2026, and it goes by xz_dec_microlzma_reset(9). go reset something. 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