Module Archive::Zip::Codec
In: lib/archive/zip/codec/deflate.rb
lib/archive/zip/codec/traditional_encryption.rb
lib/archive/zip/codec/null_encryption.rb
lib/archive/zip/codec/store.rb
lib/archive/zip/codec.rb

Archive::Zip::Codec is a factory class for generating codec object instances based on the compression method and general purpose flag fields of ZIP entries. When adding a new codec, add a mapping in the CODECS constant from the compression method field value reserved for the codec in the ZIP specification to the class implementing the codec. See the implementations of Archive::Zip::Codec::Deflate and Archive::Zip::Codec::Store for details on implementing custom codecs.

Methods

Classes and Modules

Class Archive::Zip::Codec::Deflate
Class Archive::Zip::Codec::NullEncryption
Class Archive::Zip::Codec::Store
Class Archive::Zip::Codec::TraditionalEncryption

Constants

COMPRESSION_CODECS = {}   A Hash mapping compression methods to compression codec implementations. New compression codecs must add a mapping here when defined in order to be used.
ENCRYPTION_CODECS = {}   A Hash mapping encryption methods to encryption codec implementations. New encryption codecs must add a mapping here when defined in order to be used.

Public Class methods

Returns a new compression codec instance based on compression_method and general_purpose_flags.

Returns a new encryption codec instance based on general_purpose_flags.

NOTE: The signature of this method will have to change in order to support the strong encryption codecs. This is intended to be an internal method anyway, so this fact should not cause major issues for users of this library.

[Validate]