Class | Archive::Zip::Codec::Deflate |
In: |
lib/archive/zip/codec/deflate.rb
|
Parent: | Object |
Archive::Zip::Codec::Deflate is a handle for the deflate-inflate codec as defined in Zlib which provides convenient interfaces for writing and reading deflated streams.
ID | = | 8 | The numeric identifier assigned to this compression codec by the ZIP specification. | |
NORMAL | = | 0b000 | A bit mask used to denote that Zlib‘s default compression level should be used. | |
MAXIMUM | = | 0b010 | A bit mask used to denote that Zlib‘s highest/slowest compression level should be used. | |
FAST | = | 0b100 | A bit mask used to denote that Zlib‘s lowest/fastest compression level should be used. | |
SUPER_FAST | = | 0b110 | A bit mask used to denote that Zlib should not compress data at all. |
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
Creates a new instance of this class using bits 1 and 2 of general_purpose_flags to select a compression level to be used by compressor to set up a compression IO object. The constants NORMAL, MAXIMUM, FAST, and SUPER_FAST can be used for general_purpose_flags to manually set the compression level.
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
Returns an integer used to flag that this compression codec is used for a particular ZIP archive entry.
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
A convenience method for creating an Archive::Zip::Codec::Deflate::Compress object using that class’ open method. The compression level for the open method is pulled from the value of the general_purpose_flags argument of new.
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
A convenience method for creating an Archive::Zip::Codec::Deflate::Decompress object using that class’ open method.
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
Returns an integer representing the general purpose flags of a ZIP archive entry where bits 1 and 2 are set according to the compression level selected for this object. All other bits are zero‘d out.
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
Returns an integer which indicates the version of the official ZIP specification which introduced support for this compression codec.