z_decomp_init(9)
π z_decomp_init(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this is the page for z_decomp_init, and honestly? it's giving "small function, big responsibilities" energy. it initializes a decompressor that somebody else already allocated, and yes, you do need to read the arguments. all of them. i'm not kidding π«Ά
πΈ NAME πΈ
z_decomp_init β initialize a previously-allocated decompressor. that's it, that's the whole vibe. you bring the memory, it brings the setup. π
β¨ SYNOPSIS β¨
int z_decomp_init (void *arg , unsigned char *options , int opt_len ,
int unit , int hdrlen , int mru , int debug );
look at that signature. seven arguments. she's thorough. she's committed. she ate and left no crumbs π
π ARGUMENTS π
argβ pointer to the private state for the decompressor. this is your stuff, your little corner of state, hand it over π«Άoptionsβ pointer to the CCP option data describing the compression that was negotiated with the peer. iykyk β this is the "what did we actually agree on" data π¬opt_lenβ length of the CCP option data atoptions. the size of the vibe check, basically β¨unitβ PPP unit number for diagnostic messages. this is how your logs know which unit is being messy πhdrlenβ ignored (present for backwards compatibility). bestie she is literally just here for moral support. she does nothing. iconic of her honestly πmruβ maximum length of decompressed packets. the ceiling. the limit. the "no packets above this line" sign πdebugβ debug flag; if non-zero, debug messages are printed. set it and get all the tea β
π¦ DESCRIPTION π¦
so here's the situation. the CCP options described by options must match the options specified when the decompressor was allocated. like, they have to match. this is not a drill, this is not a "close enough," this is a strict vibe check π₯
the decompressor history is reset. fresh start, clean slate, no cap. π§
as for what it returns:
0β failure (CCP options don't match). the vibes were off, the options didn't line up, sad times π1β success. slay. it worked. π
β οΈ lowkey important:0means failure here and1means success. yes, it's that way around. don't flip it, don't assume, just read the numbers. i warned you π«Ά
π SEE ALSO π
- Kernel file
./drivers/net/ppp/ppp_deflate.cβ the whole family lives here π‘ 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_reset(9)z_decompress(9)z_incomp(9)
literally the entire friend group. go read them all, they're all slay, you'll be obsessed π¦π
and that's the page, bestie!! this one came straight out of ./drivers/net/ppp and it's dated October 2026 πΈ β so go forth, initialize that decompressor, and remember: 1 is success, hdrlen is a decorative houseplant, and the options have to match. 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