DPKG::COMPRESSION::PROCESS(3perl)
π Dpkg::Compression::Process(3perl) β the libdpkg-perl one, bestie π
okay so real talk, this is a Perl module page from libdpkg-perl, and it's literally about running compression and decompression processes. yes, that kind of plumbing. but it's actually kind of iconic once you get it, i promise π«Ά
β¨ NAME β¨
Dpkg::Compression::Process β the module that runs your compression/decompression processes for you, no cap π
πΈ DESCRIPTION πΈ
So this module gives you an object oriented interface β like, a whole cute little object β to run and manage compression/decompression processes. that's it, that's the vibe. you get an object, it handles the spawnin' and the waitin', you get to live your life β¨
π¦ METHODS π¦
π $proc = Dpkg::Compression::Process->new(%opts)
Creates a brand new instance of the object. new proc, who dis π
Options:
compressionβ go peek at$proc->set_compression(), it's giving the same energy.compression_levelβ and this one? see$proc->set_compression_level(), bestie.
π $proc->set_compression($comp)
Picks which compression method you wanna use. lowkey important: it errors out if the method isn't supported according to compression_is_supported() (that one lives in Dpkg::Compression). so like, don't try to be cute with a fake method, it will clock you π
π $proc->set_compression_level($level)
Same situation but for the compression level. errors out if the level isn't valid according to compression_is_valid_level() (again, from Dpkg::Compression). vibe check on your level, essentially β¨
π @exec = $proc->get_compress_cmdline()
π @exec = $proc->get_uncompress_cmdline()
Returns a list that's ready to be handed straight to exec(). the first element is the program name β either the compression one or the decompression one, depending on which method you called β and the elements after it are the parameters for that program.
and when it actually gets executed? the program acts as a filter between its standard input and its standard output. in goes data, out comes data, slay π₯
π $proc->compress(%opts)
Starts up a compressor program. You must say where it's gonna read its uncompressed data from and where it's gonna write its compressed data to. how, you ask? by passing one "to_*" parameter and one "from_*" parameter, exactly as accepted by Dpkg::IPC::spawn() π
β οΈ okay so this part matters: you must call wait_end_process() after calling this method, so the sub-process gets properly closed β and so you can verify that it exited without error. not optional, bestie, fr fr.
Options:
See Dpkg::IPC::spawn().
π $proc->uncompress(%opts)
Basically the same deal, but for a decompressor program. This time you indicate where it'll read its compressed data from and where it'll write its uncompressed data to β again, one "to_*" parameter and one "from_*" parameter, as accepted by Dpkg::IPC::spawn() π§
β οΈ same rule, same drama: call wait_end_process() after this one too, to properly close the sub-process (and verify it exited without error). yes, both. always. π
Options:
See Dpkg::IPC::spawn().
π $proc->wait_end_process(%opts)
Calls Dpkg::IPC::wait_child() to wait until the sub-process has exited and to verify its return code. Any option you pass in gets forwarded straight to the wait_child() function β it's very "hand it off, i trust you" of it π«Ά
Most notably you can use the "no_check" option if you'd rather verify the return code yourself instead of letting wait_child() do it for you. main character energy, honestly π
Options:
See Dpkg::IPC::wait_child().
π CHANGES π
β Version 1.00 (dpkg 1.15.6)
Marked the module as public. iconic moment, honestly, this is the glow-up β¨
and that's the page, bestie π written up as 1.23.11-dirty, dated 2026-09-09 β that's the Dpkg::Compression::Process(3perl) of the libdpkg-perl world, and now you know her ππΈ
π¦ where this page comes from
- arch rolling: dpkg 1.23.11-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms