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

Compress::Raw::Zlib::Base

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_WBITS

    To 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 to WANT_GZIP.

    For a definition of the meaning and valid values for WindowBits refer to the zlib documentation for inflateInit2.

  • Dictionary : Int = undef

    The dictionary.

  • Bufsize : Int = 4096

    The initial size for the output buffer.

  • LimitOutput : Int = 0

    See "inflate" about this option.

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