z_decompress(9)
π z_decompress π
okay so bestie, this is the Kernel API Manual page for z_decompress(9) β yes, section 9, kernel land, we love a low-level moment β¨. The whole vibe? Decompress a Deflate-compressed packet. No cap.
β¨ NAME β¨
z_decompress β decompress a Deflate-compressed packet.
πΈ SYNOPSIS πΈ
int z_decompress (void *arg , unsigned char *ibuf , int isize , unsigned
char *obuf , int osize );
π ARGUMENTS π
argβ pointer to private state for the decompressor. It's the decompressor's own lil stash of private state, okay? πibufβ pointer to input (compressed) packet data. The compressed packet tea βisizeβ length of input packet. How many bytes of that compressed packet we're working with.obufβ pointer to space for output (decompressed) packet. The spot where the decompressed packet goes β¨osizeβ amount of space available atobuf. The size budget for that output spot.
π¦ DESCRIPTION π¦
Okay so here's the patent-lore part, and it's giving drama: because of patent problems, we return DECOMP_ERROR for errors found by inspecting the input data and for system problems, but we return DECOMP_FATALERROR for any errors which could possibly be said to be being detected "after" decompression. For DECOMP_ERROR, we can issue a CCP reset-request; for DECOMP_FATALERROR, we may be infringing a patent of Motorola's if we do, so we take CCP down instead. π
β οΈ bestie, this is the whole patent-coded reason the two error paths are different. Do not flatten it:DECOMP_ERRORcan go with a CCP reset-request; withDECOMP_FATALERROR, doing that may infringe a patent of Motorola's, so CCP gets taken down instead.
And then there's this: given that the frame has the correct sequence number and a good FCS, errors such as invalid codes in the input most likely indicate a bug, so we return DECOMP_FATALERROR for them in order to turn off compression, even though they are detected by inspecting the input. It's giving "the vibes say bug," and the response is to turn off compression, periodt.
π SEE ALSO π
Kernel file ./drivers/net/ppp/ppp_deflate.c β and the whole squad: z_comp_free(9), z_comp_alloc(9), z_comp_init(9), z_comp_reset(9), z_compress(9), z_comp_stats(9), z_decomp_free(9), z_decomp_alloc(9), z_decomp_init(9), z_decomp_reset(9), z_incomp(9).
mwah π β this page lives under ./drivers/net/ppp, and it's dated October 2026. z_decompress(9) out. π«Ά
π¦ 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