.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Dpkg::Compression::Process 3perl" .TH Dpkg::Compression::Process 3perl "2022-09-01" "1.20.12" "libdpkg-perl" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Dpkg::Compression::Process \- run compression/decompression processes .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides an object oriented interface to run and manage compression/decompression processes. .SH "METHODS" .IX Header "METHODS" .ie n .IP "$proc = Dpkg::Compression::Process\->new(%opts)" 4 .el .IP "\f(CW$proc\fR = Dpkg::Compression::Process\->new(%opts)" 4 .IX Item "$proc = Dpkg::Compression::Process->new(%opts)" Create a new instance of the object. Supported options are \*(L"compression\*(R" and \*(L"compression_level\*(R" (see corresponding set_* functions). .ie n .IP "$proc\->set_compression($comp)" 4 .el .IP "\f(CW$proc\fR\->set_compression($comp)" 4 .IX Item "$proc->set_compression($comp)" Select the compression method to use. It errors out if the method is not supported according to \f(CW\*(C`compression_is_supported\*(C'\fR (of \&\fBDpkg::Compression\fR). .ie n .IP "$proc\->set_compression_level($level)" 4 .el .IP "\f(CW$proc\fR\->set_compression_level($level)" 4 .IX Item "$proc->set_compression_level($level)" Select the compression level to use. It errors out if the level is not valid according to \f(CW\*(C`compression_is_valid_level\*(C'\fR (of \&\fBDpkg::Compression\fR). .ie n .IP "@exec = $proc\->\fBget_compress_cmdline()\fR" 4 .el .IP "\f(CW@exec\fR = \f(CW$proc\fR\->\fBget_compress_cmdline()\fR" 4 .IX Item "@exec = $proc->get_compress_cmdline()" .PD 0 .ie n .IP "@exec = $proc\->\fBget_uncompress_cmdline()\fR" 4 .el .IP "\f(CW@exec\fR = \f(CW$proc\fR\->\fBget_uncompress_cmdline()\fR" 4 .IX Item "@exec = $proc->get_uncompress_cmdline()" .PD Returns a list ready to be passed to \f(CW\*(C`exec\*(C'\fR, its first element is the program name (either for compression or decompression) and the following elements are parameters for the program. .Sp When executed the program acts as a filter between its standard input and its standard output. .ie n .IP "$proc\->compress(%opts)" 4 .el .IP "\f(CW$proc\fR\->compress(%opts)" 4 .IX Item "$proc->compress(%opts)" Starts a compressor program. You must indicate where it will read its uncompressed data from and where it will write its compressed data to. This is accomplished by passing one parameter \f(CW\*(C`to_*\*(C'\fR and one parameter \&\f(CW\*(C`from_*\*(C'\fR as accepted by \fBDpkg::IPC::spawn\fR. .Sp You must call \f(CW\*(C`wait_end_process\*(C'\fR after having called this method to properly close the sub-process (and verify that it exited without error). .ie n .IP "$proc\->uncompress(%opts)" 4 .el .IP "\f(CW$proc\fR\->uncompress(%opts)" 4 .IX Item "$proc->uncompress(%opts)" Starts a decompressor program. You must indicate where it will read its compressed data from and where it will write its uncompressed data to. This is accomplished by passing one parameter \f(CW\*(C`to_*\*(C'\fR and one parameter \&\f(CW\*(C`from_*\*(C'\fR as accepted by \fBDpkg::IPC::spawn\fR. .Sp You must call \f(CW\*(C`wait_end_process\*(C'\fR after having called this method to properly close the sub-process (and verify that it exited without error). .ie n .IP "$proc\->wait_end_process(%opts)" 4 .el .IP "\f(CW$proc\fR\->wait_end_process(%opts)" 4 .IX Item "$proc->wait_end_process(%opts)" Call \fBDpkg::IPC::wait_child\fR to wait until the sub-process has exited and verify its return code. Any given option will be forwarded to the \f(CW\*(C`wait_child\*(C'\fR function. Most notably you can use the \*(L"nocheck\*(R" option to verify the return code yourself instead of letting \f(CW\*(C`wait_child\*(C'\fR do it for you. .SH "CHANGES" .IX Header "CHANGES" .SS "Version 1.00 (dpkg 1.15.6)" .IX Subsection "Version 1.00 (dpkg 1.15.6)" Mark the module as public.