POE::Fi...::Stream(3)
β¨ NAME β¨
POE::Filter::Zlib::Stream β bestie, it's a POE filter wrapped around Compress::Zlib's deflate and inflate π (yes the manual has two NAME sections, and honestly? iconic of it. we're keeping both, no cap)
π VERSION π
version 2.04 β she's serving stable release energy πΈ
π¦ SYNOPSIS π¦
use POE::Filter::Zlib::Stream;
my $filter = POE::Filter::Zlib::Stream->new( deflateopts => { -Level => 9 } );
my $scalar = 'Blah Blah Blah';
my $compressed_array = $filter->put( [ $scalar ] );
my $uncompressed_array = $filter->get( $compressed_array );
use POE qw(Filter::Stackable Filter::Line Filter::Zlib::Stream);
my ($filter) = POE::Filter::Stackable->new();
$filter->push( POE::Filter::Zlib::Stream->new(),
POE::Filter::Line->new( InputRegexp => '\015?\012', OutputLiteral => "\015\012" ),
(okay so yes, the last line in the original literally just trails off with a dangling comma and no closing paren β I'm not touching it, that's her choice, we respect it π )
π DESCRIPTION π
POE::Filter::Zlib::Stream gives you a POE filter that does compression/uncompression using Compress::Zlib. It's built to vibe with POE::Filter::Stackable. π«Ά
Unlike POE::Filter::Zlib, this one uses deflate and inflate β not the higher-level compress and uncompress. So it's lowkey the raw, streamier cousin.
Ideal for streaming compressed data over sockets. β¨ main character networking energy
π NAME π
(again, yes, we said what we said)
POE::Filter::Zlib::Stream β A POE filter wrapped around Compress::Zlib deflate and inflate. π¦
π CONSTRUCTOR π
new
Creates a new POE::Filter::Zlib::Stream object. Takes some optional arguments:
deflateoptsβ a hashref of options to be passed todeflateInit();πinflateoptsβ a hashref of options to be passed toinflateInit();π§flushtypeβ the type of flush to use when flushing the compressed data. Defaults toZ_SYNC_FLUSHso you get a single stream, but if there is aPOE::Filter::Zlibon the other end, you want to set this toZ_FINISH. (read that twice, bestie β mismatched flush types on either end is a whole situationship you do NOT want π)
Consult Compress::Zlib for more detail regarding these options. π
π METHODS π
get
get_one_start
get_one
Takes an arrayref which is contains streams of compressed input. Returns an arrayref of uncompressed streams. πΈ
get_pending
Returns any data in a filter's input buffer. The filter's input buffer is not cleared, however. (so likeβ¦ peeking. she's looking but not touching π)
put
Takes an arrayref containing streams of uncompressed output, returns an arrayref of compressed streams. π₯
clone
Makes a copy of the filter, and clears the copy's buffer. β¨
β AUTHOR β
Chris Williams <chris@bingosnet.co.uk>
Martijn van Beers <martijn@cpan.org>
πΌ LICENSE πΌ
Copyright Β© Chris Williams and Martijn van Beers.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π SEE ALSO π
POE::FilterCompress::ZlibPOE::Filter::Stackable
π«Ά AUTHORS π«Ά
- Chris Williams <chris@bingosnet.co.uk>
- Martijn van Beers
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017 by Chris Williams and Martijn van Beers.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
k bye bestie, go compress something π this was POE::Fi...::Stream(3) from the User Contributed Perl Documentation, version 2.04, and the page footer said perl v5.42.0 dated 2025-07-25 β slay, that's a wrap β¨ππ¦
π¦ where this page comes from
- fedora 43: perl-POE-Filter-Zlib 2.04-26.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms