Name
SPVM::Compress::Raw::Zlib::Inflate - Low-Level Interface to zlib inflate
Description
Compress::Raw::Zlib::Inflate class in SPVM is a low-level interface to zlib inflate
function.
Usage
use Compress::Raw::Zlib::Inflate;
my $i = Compress::Raw::Zlib::Inflate->new($options);
my $output_ref = [(string)undef];
$i->inflate($input, $output_ref);
$i->adler() ;
$i->total_in() ;
$i->total_out() ;
$i->get_BufSize();
Super Class
Class Methods
new
static method new : Compress::Raw::Zlib::Inflate ($options : object[] = undef);
Creates a new Compress::Raw::Zlib::Inflate object, and returns it.
Options:
WindowBits
: Int = MAX_WBITSTo compress an RFC 1950 data stream, set WindowBits to a positive number between 8 and 15.
To compress an RFC 1951 data stream, set WindowBits to -
MAX_WBITS
.To compress an RFC 1952 data stream (i.e. gzip), set
WindowBits
toWANT_GZIP
.For a definition of the meaning and valid values for
WindowBits
refer to the zlib documentation for inflateInit2.Dictionary
: Int = undefThe dictionary.
Bufsize
: Int = 4096The initial size for the output buffer.
LimitOutput
: Int = 0See "inflate" about this option.
AppendOutput
: Int = 0If this option is set to false, the output buffers in "inflate" method will be truncated before uncompressed data is written to them.
If the option is set to true, uncompressed data will be appended to the output buffer in "inflate" methods.
See Compress::Raw::Zlib::Constant about zlib
constants.
Instance Methods
inflate
method inflate : int ($input : mutable string, $output_ref : string[]);
Inflates the complete contents of $input and writes the uncompressed data to $output_ref->[0].
The $input parameter is modified by inflate.
If LimitOutput
option in "new" method is a false value, all $input is consumed. Otherwise $input might not be fully consumed, and some of it might remain.
If all $input is consumed, the output data has been flushed.
inflateReset
method inflateReset : void ();
Reset the z_stream
object.
DESTROY
method DESTROY : void ();
Finalizes and frees the z_stream
object.
See Also
Copyright & License
Copyright (c) 2025 Yuki Kimoto
MIT License