1POE::Filter::Zlib::StreUasme(r3)Contributed Perl DocumenPtOaEt:i:oFnilter::Zlib::Stream(3)
2
3
4
6 POE::Filter::Zlib::Stream -- A POE filter wrapped around Compress::Zlib
7 deflate and inflate.
8
10 use POE::Filter::Zlib::Stream;
11
12 my $filter = POE::Filter::Zlib::Stream->new( deflateopts => { -Level => 9 } );
13 my $scalar = 'Blah Blah Blah';
14 my $compressed_array = $filter->put( [ $scalar ] );
15 my $uncompressed_array = $filter->get( $compressed_array );
16
17 use POE qw(Filter::Stackable Filter::Line Filter::Zlib::Stream);
18
19 my ($filter) = POE::Filter::Stackable->new();
20 $filter->push( POE::Filter::Zlib::Stream->new(),
21 POE::Filter::Line->new( InputRegexp => '\015?\012', OutputLiteral => "\015\012" ),
22
24 POE::Filter::Zlib::Stream provides a POE filter for performing compresā
25 sion/uncompression using Compress::Zlib. It is suitable for use with
26 POE::Filter::Stackable.
27
28 Unlike POE::Filter::Zlib this filter uses deflate and inflate, not the
29 higher level compress and uncompress.
30
31 Ideal for streaming compressed data over sockets.
32
34 new Creates a new POE::Filter::Zlib::Stream object. Takes some optional
35 arguments:
36
37 "deflateopts", a hashref of options to be passed to deflateInit();
38 "inflateopts", a hashref of options to be passed to inflateInit();
39
40 Consult Compress::Zlib for more detail regarding these options.
41
43 get
44 get_one_start
45 get_one
46 Takes an arrayref which is contains streams of compressed input.
47 Returns an arrayref of uncompressed streams.
48
49 put Takes an arrayref containing streams of uncompressed output,
50 returns an arrayref of compressed streams.
51
53 Chris Williams <chris@bingosnet.co.uk>
54
56 POE::Filter
57
58 Compress::Zlib
59
60 POE::Filter::Stackable
61
62
63
64perl v5.8.8 2006-11-21 POE::Filter::Zlib::Stream(3)