- Inheritance
- < Zlib::ZStream < Object
Zlib:Inflate is the class for decompressing compressed data. Unlike Zlib::Deflate, an instance of this class is not able to duplicate (clone, dup) itself.
Methods
Class
Visibility | Signature |
---|---|
public | inflate (p1) |
public | new (...) |
Instance
Visibility | Signature |
---|---|
public | << (p1) |
public | inflate (p1) |
public | set_dictionary (p1) |
public | sync (p1) |
public | sync_point? () |
Class Method Detail
Zlib::Inflate.inflate(string)
Decompresses string. Raises a Zlib::NeedDict exception if a preset dictionary is needed for decompression.
This method is almost equivalent to the following code:
def inflate(string) zstream = Zlib::Inflate.new buf = zstream.inflate(string) zstream.finish zstream.close buf end
Zlib::Inflate.new(window_bits)
Creates a new inflate stream for decompression. See zlib.h for details of the argument. If window_bits is nil, the default value is used.
TODO: document better!
Instance Method Detail
<<(p1)
Same as IO.
inflate(string)
Inputs string into the inflate stream and returns the output from the stream. Calling this method, both the input and the output buffer of the stream are flushed. If string is nil, this method finishes the stream, just like Zlib::ZStream#finish.
Raises a Zlib::NeedDict exception if a preset dictionary is needed to decompress. Set the dictionary by Zlib::Inflate#set_dictionary and then call this method again with an empty string. (???)
TODO: document better!
set_dictionary(p1)
Sets the preset dictionary and returns string. This method is available just only after a Zlib::NeedDict exception was raised. See zlib.h for details.
TODO: document better!
sync(string)
Inputs string into the end of input buffer and skips data until a full flush point can be found. If the point is found in the buffer, this method flushes the buffer and returns false. Otherwise it returns true and the following data of full flush point is preserved in the buffer.
sync_point?()
Quoted verbatim from original documentation:
What is this?
:)