1POE::Filter::Zlib(3)  User Contributed Perl Documentation POE::Filter::Zlib(3)
2
3
4

NAME

6       POE::Filter::Zlib - A POE filter wrapped around Compress::Zlib
7

SYNOPSIS

9           use POE::Filter::Zlib;
10
11           my $filter = POE::Filter::Zlib->new();
12           my $scalar = 'Blah Blah Blah';
13           my $compressed_array   = $filter->put( [ $scalar ] );
14           my $uncompressed_array = $filter->get( $compressed_array );
15
16           use POE qw(Filter::Stackable Filter::Line Filter::Zlib);
17
18           my ($filter) = POE::Filter::Stackable->new();
19           $filter->push( POE::Filter::Zlib->new(),
20                          POE::Filter::Line->new( InputRegexp => '\015?\012', OutputLiteral => "\015\012" ),
21

DESCRIPTION

23       POE::Filter::Zlib provides a POE filter for performing
24       compression/uncompression using Compress::Zlib. It is suitable for use
25       with POE::Filter::Stackable.
26
27       This filter is not ideal for streaming compressed data over sockets
28       etc. as it employs compress and uncompress zlib functions.
29
30       POE::Filter::Zlib::Stream is recommended for that type of activity.
31

CONSTRUCTOR

33       "new"
34           Creates a new POE::Filter::Zlib object. Takes one optional
35           argument,
36
37             'level': the level of compression to employ.
38
39           Consult Compress::Zlib for details.
40

METHODS

42       "get"
43       "get_one_start"
44       "get_one"
45           Takes an arrayref which is contains lines of compressed input.
46           Returns an arrayref of uncompressed lines.
47
48       "get_pending"
49           Returns any data in a filter's input buffer. The filter's input
50           buffer is not cleared, however.
51
52       "put"
53           Takes an arrayref containing lines of uncompressed output, returns
54           an arrayref of compressed lines.
55
56       "clone"
57           Makes a copy of the filter, and clears the copy's buffer.
58
59       "level"
60           Sets the level of compression employed to the given value. If no
61           value is supplied, returns the current level setting.
62

AUTHOR

64       Chris Williams <chris@bingosnet.co.uk>
65
66       Martijn van Beers <martijn@cpan.org>
67

LICENSE

69       Copyright X Chris Williams and Martijn van Beers.
70
71       This program is free software; you can redistribute it and/or modify it
72       under the same terms as Perl itself.
73

SEE ALSO

75       POE
76
77       POE::Filter
78
79       POE::Filter::Zlib::Stream
80
81       Compress::Zlib
82
83       POE::Filter::Stackable
84
85
86
87perl v5.12.0                      2009-05-29              POE::Filter::Zlib(3)
Impressum