Class | Archive::Zip::Codec::Deflate::Decompress |
In: |
lib/archive/zip/codec/deflate.rb
|
Parent: | Zlib::ZReader |
Archive::Zip::Codec::Deflate::Decompress extends Zlib::ZReader in order to specify the standard Zlib options required by ZIP archives and to provide a close method which can optionally close the delegate IO-like object. In addition a convenience method is provided for generating DataDescriptor objects based on the data which is passed through this object.
Instances of this class should only be accessed via the Archive::Zip::Codec::Deflate#decompressor method.
crc32 | -> | checksum |
crc32 | [R] |
The CRC32 checksum of the uncompressed data read using this object.
NOTE: The contents of the internal read buffer are immediately processed any time the internal buffer is filled, so this checksum is only accurate if all data has been read out of this object. |
Creates a new instance of this class using io as a data source. io must be readable and provide a read method as IO does or errors will be raised when performing read operations. If io provides a rewind method, this class’ rewind method will be enabled.
Closes this object so that further read operations will fail. If close_delegate is true, the delegate object used as a data source will also be closed using its close method.
Returns an instance of Archive::Zip::DataDescriptor with information regarding the data which has passed through this object from the delegate object. It is recommended to call the close method before calling this in order to ensure that no further read operations change the state of this object.