partial_decompress(9)
π NAME π
okay so bestie, welcome to partial_decompress(9) from the Kernel API Manual β it's literally the function that decompresses part or all of a compressed buffer β¨
πΈ SYNOPSIS πΈ
long partial_decompress (void *inbuf , unsigned long input_size , void
*outbuf , unsigned long output_size , unsigned long _skip );
π«Ά ARGUMENTS π«Ά
inbufβ the input buffer, aka where the compressed data is sitting.input_sizeβ the length of that input buffer.outbufβ the output buffer, aka where the decompressed bytes get written.output_sizeβ the length of the output buffer._skipβ the number of output bytes to ignore.
β¨ DESCRIPTION β¨
So the way this works: partial_decompress takes the compressed data from inbuf, decompresses it, and writes it into outbuf. Iconic behavior, honestly π
Once output_size bytes have been written to the output buffer, or the stream is exhausted, the function returns the number of bytes that were decompressed. Otherwise, it returns whatever error code the decompressor reported. And heads up: (NB: This is specific to each decompressor type) β no cap, that part is literally different depending on the decompressor.
The _skip functionality is mainly there so the program can discover the size of the compressed image, so it can ask firmware (if present) for an appropriately sized buffer. Very "let me check the vibe first" of it π¦
π₯ SEE ALSO π₯
- Kernel file
./arch/powerpc/boot/decompress.c
This page is brought to you by source/version ./arch/powerpc/boot and dated October 2026 β mwah, bestie ππ
π¦ 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