1Dpkg::Compression::Process(3)    libdpkg-perl    Dpkg::Compression::Process(3)
2
3
4

NAME

6       Dpkg::Compression::Process - run compression/decompression processes
7

DESCRIPTION

9       This module provides an object oriented interface to run and manage
10       compression/decompression processes.
11

METHODS

13       $proc = Dpkg::Compression::Process->new(%opts)
14           Create a new instance of the object. Supported options are
15           "compression" and "compression_level" (see corresponding set_*
16           functions).
17
18       $proc->set_compression($comp)
19           Select the compression method to use. It errors out if the method
20           is not supported according to "compression_is_supported" (of
21           Dpkg::Compression).
22
23       $proc->set_compression_level($level)
24           Select the compression level to use. It errors out if the level is
25           not valid according to "compression_is_valid_level" (of
26           Dpkg::Compression).
27
28       @exec = $proc->get_compress_cmdline()
29       @exec = $proc->get_uncompress_cmdline()
30           Returns a list ready to be passed to "exec", its first element is
31           the program name (either for compression or decompression) and the
32           following elements are parameters for the program.
33
34           When executed the program acts as a filter between its standard
35           input and its standard output.
36
37       $proc->compress(%opts)
38           Starts a compressor program. You must indicate where it will read
39           its uncompressed data from and where it will write its compressed
40           data to.  This is accomplished by passing one parameter "to_*" and
41           one parameter "from_*" as accepted by Dpkg::IPC::spawn.
42
43           You must call "wait_end_process" after having called this method to
44           properly close the sub-process (and verify that it exited without
45           error).
46
47       $proc->uncompress(%opts)
48           Starts a decompressor program. You must indicate where it will read
49           its compressed data from and where it will write its uncompressed
50           data to.  This is accomplished by passing one parameter "to_*" and
51           one parameter "from_*" as accepted by Dpkg::IPC::spawn.
52
53           You must call "wait_end_process" after having called this method to
54           properly close the sub-process (and verify that it exited without
55           error).
56
57       $proc->wait_end_process(%opts)
58           Call Dpkg::IPC::wait_child to wait until the sub-process has exited
59           and verify its return code. Any given option will be forwarded to
60           the "wait_child" function. Most notably you can use the "nocheck"
61           option to verify the return code yourself instead of letting
62           "wait_child" do it for you.
63

CHANGES

65   Version 1.00 (dpkg 1.15.6)
66       Mark the module as public.
67
68
69
701.18.25                           2019-07-24     Dpkg::Compression::Process(3)
Impressum