1POE::Filter::Zlib::StreUasme(r3)Contributed Perl DocumenPtOaEt:i:oFnilter::Zlib::Stream(3)
2
3
4

NAME

6       POE::Filter::Zlib::Stream
7

VERSION

9       version 2.04
10

SYNOPSIS

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

DESCRIPTION

26       POE::Filter::Zlib::Stream provides a POE filter for performing
27       compression/uncompression using Compress::Zlib. It is suitable for use
28       with POE::Filter::Stackable.
29
30       Unlike POE::Filter::Zlib this filter uses deflate and inflate, not the
31       higher level compress and uncompress.
32
33       Ideal for streaming compressed data over sockets.
34

NAME

36       POE::Filter::Zlib::Stream - A POE filter wrapped around Compress::Zlib
37       deflate and inflate.
38

CONSTRUCTOR

40       "new"
41           Creates a new POE::Filter::Zlib::Stream object. Takes some optional
42           arguments:
43
44           "deflateopts"
45               a hashref of options to be passed to deflateInit();
46
47           "inflateopts"
48               a hashref of options to be passed to inflateInit();
49
50           "flushtype"
51               The type of flush to use when flushing the compressed data.
52               Defaults to Z_SYNC_FLUSH so you get a single stream, but if
53               there is a POE::Filter::Zlib on the other end, you want to set
54               this to Z_FINISH.
55
56           Consult Compress::Zlib for more detail regarding these options.
57

METHODS

59       "get"
60       "get_one_start"
61       "get_one"
62           Takes an arrayref which is contains streams of compressed input.
63           Returns an arrayref of uncompressed streams.
64
65       "get_pending"
66           Returns any data in a filter's input buffer. The filter's input
67           buffer is not cleared, however.
68
69       "put"
70           Takes an arrayref containing streams of uncompressed output,
71           returns an arrayref of compressed streams.
72
73       "clone"
74           Makes a copy of the filter, and clears the copy's buffer.
75

AUTHOR

77       Chris Williams <chris@bingosnet.co.uk>
78
79       Martijn van Beers <martijn@cpan.org>
80

LICENSE

82       Copyright © Chris Williams and Martijn van Beers.
83
84       This program is free software; you can redistribute it and/or modify it
85       under the same terms as Perl itself.
86

SEE ALSO

88       POE::Filter
89
90       Compress::Zlib
91
92       POE::Filter::Stackable
93

AUTHORS

95       •   Chris Williams <chris@bingosnet.co.uk>
96
97       •   Martijn van Beers
98
100       This software is copyright (c) 2017 by Chris Williams and Martijn van
101       Beers.
102
103       This is free software; you can redistribute it and/or modify it under
104       the same terms as the Perl 5 programming language system itself.
105
106
107
108perl v5.36.0                      2023-01-20      POE::Filter::Zlib::Stream(3)
Impressum