Class: Archive::Zip::Codec::Store
- Inherits:
-
Object
- Object
- Archive::Zip::Codec::Store
- Defined in:
- lib/archive/zip/codec/store.rb
Overview
Archive::Zip::Codec::Store is a handle for the store-unstore (no compression) codec.
Defined Under Namespace
Classes: Compress, Decompress
Constant Summary
- ID =
The numeric identifier assigned to this compresion codec by the ZIP specification.
0
Instance Method Summary (collapse)
-
- (Object) compression_method
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
-
- (Object) compressor(io, &b)
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
-
- (Object) decompressor(io, &b)
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
-
- (Object) general_purpose_flags
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
-
- (Store) initialize(general_purpose_flags = 0)
constructor
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
-
- (Object) version_needed_to_extract
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
Constructor Details
- (Store) initialize(general_purpose_flags = 0)
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. general_purpose_flags is not used.
247 248 |
# File 'lib/archive/zip/codec/store.rb', line 247 def initialize(general_purpose_flags = 0) end |
Instance Method Details
- (Object) compression_method
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.
283 284 285 |
# File 'lib/archive/zip/codec/store.rb', line 283 def compression_method ID end |
- (Object) compressor(io, &b)
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::Store::Compress object using that class' open method.
255 256 257 |
# File 'lib/archive/zip/codec/store.rb', line 255 def compressor(io, &b) Compress.open(io, &b) end |
- (Object) decompressor(io, &b)
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::Store::Decompress object using that class' open method.
265 266 267 |
# File 'lib/archive/zip/codec/store.rb', line 265 def decompressor(io, &b) Decompress.open(io, &b) end |
- (Object) general_purpose_flags
This method signature is part of the interface contract expected by Archive::Zip::Entry for compression codec objects.
Returns 0 since this compression codec does not make use of general purpose flags of ZIP archive entries.
292 293 294 |
# File 'lib/archive/zip/codec/store.rb', line 292 def general_purpose_flags 0 end |
- (Object) version_needed_to_extract
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.
274 275 276 |
# File 'lib/archive/zip/codec/store.rb', line 274 def version_needed_to_extract 0x000a end |