man-pages/man3/Dpkg::Compression::Process.3perl.html
2021-03-31 01:06:50 +01:00

150 lines
3.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Dpkg::Compression::Process</TITLE>
</HEAD><BODY>
<H1>Dpkg::Compression::Process</H1>
Section: libdpkg-perl (3perl)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
Dpkg::Compression::Process - run compression/decompression processes
<A NAME="lbAC">&nbsp;</A>
<H2>DESCRIPTION</H2>
This module provides an object oriented interface to run and manage
compression/decompression processes.
<A NAME="lbAD">&nbsp;</A>
<H2>METHODS</H2>
<DL COMPACT>
<DT id="1">$proc = Dpkg::Compression::Process-&gt;new(%opts)<DD>
Create a new instance of the object. Supported options are ``compression''
and ``compression_level'' (see corresponding set_* functions).
<DT id="2">$proc-&gt;set_compression($comp)<DD>
Select the compression method to use. It errors out if the method is not
supported according to <TT>&quot;compression_is_supported&quot;</TT> (of
<B>Dpkg::Compression</B>).
<DT id="3">$proc-&gt;set_compression_level($level)<DD>
Select the compression level to use. It errors out if the level is not
valid according to <TT>&quot;compression_is_valid_level&quot;</TT> (of
<B>Dpkg::Compression</B>).
<DT id="4">@exec = $proc-&gt;<B>get_compress_cmdline()</B><DD>
<DT id="5">@exec = $proc-&gt;<B>get_uncompress_cmdline()</B><DD>
Returns a list ready to be passed to <TT>&quot;exec&quot;</TT>, its first element is the
program name (either for compression or decompression) and the following
elements are parameters for the program.
<P>
When executed the program acts as a filter between its standard input
and its standard output.
<DT id="6">$proc-&gt;compress(%opts)<DD>
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 <TT>&quot;to_*&quot;</TT> and one parameter
<TT>&quot;from_*&quot;</TT> as accepted by <B>Dpkg::IPC::spawn</B>.
<P>
You must call <TT>&quot;wait_end_process&quot;</TT> after having called this method to
properly close the sub-process (and verify that it exited without error).
<DT id="7">$proc-&gt;uncompress(%opts)<DD>
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 <TT>&quot;to_*&quot;</TT> and one parameter
<TT>&quot;from_*&quot;</TT> as accepted by <B>Dpkg::IPC::spawn</B>.
<P>
You must call <TT>&quot;wait_end_process&quot;</TT> after having called this method to
properly close the sub-process (and verify that it exited without error).
<DT id="8">$proc-&gt;wait_end_process(%opts)<DD>
Call <B>Dpkg::IPC::wait_child</B> to wait until the sub-process has exited
and verify its return code. Any given option will be forwarded to
the <TT>&quot;wait_child&quot;</TT> function. Most notably you can use the ``nocheck'' option
to verify the return code yourself instead of letting <TT>&quot;wait_child&quot;</TT> do
it for you.
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>CHANGES</H2>
<A NAME="lbAF">&nbsp;</A>
<H3>Version 1.00 (dpkg 1.15.6)</H3>
Mark the module as public.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
<DT id="10"><A HREF="#lbAC">DESCRIPTION</A><DD>
<DT id="11"><A HREF="#lbAD">METHODS</A><DD>
<DT id="12"><A HREF="#lbAE">CHANGES</A><DD>
<DL>
<DT id="13"><A HREF="#lbAF">Version 1.00 (dpkg 1.15.6)</A><DD>
</DL>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:38 GMT, March 31, 2021
</BODY>
</HTML>