xz_dec_microlzma_reset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 using xz_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_exact is set to false. lowkey a loophole, highkey documented.
    • but you can never set uncomp_size to a value larger than the expected real uncompressed size 😭 because that would eventually result in XZ_DATA_ERROR. not a cute error. a XZ_DATA_ERROR error. avoid πŸ’€
  • uncomp_size_is_exact β€” ok so this one is an int instead of a bool purely to avoid requiring stdbool.h 🫢 iconic C decision-making, honestly. it should normally be set to true ⭐. and when you set it to false, 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 🧚:


🌟 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