146 lines
3.9 KiB
HTML
146 lines
3.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Dpkg::Compression</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Dpkg::Compression</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"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Dpkg::Compression - simple database of available compression methods
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
This modules provides a few public functions and a public regex to
|
|
interact with the set of supported compression methods.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>FUNCTIONS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">@list = <B>compression_get_list()</B><DD>
|
|
|
|
|
|
|
|
|
|
Returns a list of supported compression methods (sorted alphabetically).
|
|
<DT id="2">compression_is_supported($comp)<DD>
|
|
|
|
|
|
Returns a boolean indicating whether the give compression method is
|
|
known and supported.
|
|
<DT id="3">compression_get_property($comp, $property)<DD>
|
|
|
|
|
|
|
|
|
|
Returns the requested property of the compression method. Returns undef if
|
|
either the property or the compression method doesn't exist. Valid
|
|
properties currently include ``file_ext'' for the file extension,
|
|
``default_level'' for the default compression level,
|
|
``comp_prog'' for the name of the compression program and ``decomp_prog'' for
|
|
the name of the decompression program.
|
|
<DT id="4">compression_guess_from_filename($filename)<DD>
|
|
|
|
|
|
Returns the compression method that is likely used on the indicated
|
|
filename based on its file extension.
|
|
<DT id="5">$regex = <B>compression_get_file_extension_regex()</B><DD>
|
|
|
|
|
|
|
|
|
|
Returns a regex that matches a file extension of a file compressed with
|
|
one of the supported compression methods.
|
|
<DT id="6">$comp = <B>compression_get_default()</B><DD>
|
|
|
|
|
|
|
|
|
|
Return the default compression method. It is ``xz'' unless
|
|
<TT>"compression_set_default"</TT> has been used to change it.
|
|
<DT id="7">compression_set_default($comp)<DD>
|
|
|
|
|
|
Change the default compression method. Errors out if the
|
|
given compression method is not supported.
|
|
<DT id="8">$level = <B>compression_get_default_level()</B><DD>
|
|
|
|
|
|
|
|
|
|
Return the default compression level used when compressing data. It's ``9''
|
|
for ``gzip'' and ``bzip2'', ``6'' for ``xz'' and ``lzma'', unless
|
|
<TT>"compression_set_default_level"</TT> has been used to change it.
|
|
<DT id="9">compression_set_default_level($level)<DD>
|
|
|
|
|
|
Change the default compression level. Passing undef as the level will
|
|
reset it to the compressor specific default, otherwise errors out if the
|
|
level is not valid (see <TT>"compression_is_valid_level"</TT>).
|
|
<DT id="10">compression_is_valid_level($level)<DD>
|
|
|
|
|
|
Returns a boolean indicating whether <TT>$level</TT> is a valid compression level
|
|
(it must be either a number between 1 and 9 or ``fast'' or ``best'')
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>CHANGES</H2>
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Version 1.02 (dpkg 1.17.2)</H3>
|
|
|
|
|
|
|
|
New function: <B>compression_get_file_extension_regex()</B>
|
|
<P>
|
|
|
|
Deprecated variables: <TT>$default_compression</TT>, <TT>$default_compression_level</TT>
|
|
and <TT>$compression_re_file_ext</TT>
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Version 1.01 (dpkg 1.16.1)</H3>
|
|
|
|
|
|
|
|
Default compression level is not global any more, it is per compressor type.
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Version 1.00 (dpkg 1.15.6)</H3>
|
|
|
|
|
|
|
|
Mark the module as public.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="11"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="12"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="13"><A HREF="#lbAD">FUNCTIONS</A><DD>
|
|
<DT id="14"><A HREF="#lbAE">CHANGES</A><DD>
|
|
<DL>
|
|
<DT id="15"><A HREF="#lbAF">Version 1.02 (dpkg 1.17.2)</A><DD>
|
|
<DT id="16"><A HREF="#lbAG">Version 1.01 (dpkg 1.16.1)</A><DD>
|
|
<DT id="17"><A HREF="#lbAH">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>
|