Class: Zip::Decompressor
- Inherits:
-
Object
- Object
- Zip::Decompressor
- Defined in:
- lib/zip/decompressor.rb
Overview
:nodoc:all
Direct Known Subclasses
Constant Summary collapse
- CHUNK_SIZE =
32_768
Instance Attribute Summary collapse
-
#decompressed_size ⇒ Object
readonly
Returns the value of attribute decompressed_size.
-
#input_stream ⇒ Object
readonly
Returns the value of attribute input_stream.
Class Method Summary collapse
- .decompressor_classes ⇒ Object
- .find_by_compression_method(compression_method) ⇒ Object
- .register(compression_method, decompressor_class) ⇒ Object
Instance Method Summary collapse
-
#initialize(input_stream, decompressed_size = nil) ⇒ Decompressor
constructor
A new instance of Decompressor.
Constructor Details
#initialize(input_stream, decompressed_size = nil) ⇒ Decompressor
Returns a new instance of Decompressor.
20 21 22 23 24 25 |
# File 'lib/zip/decompressor.rb', line 20 def initialize(input_stream, decompressed_size = nil) super() @input_stream = input_stream @decompressed_size = decompressed_size end |
Instance Attribute Details
#decompressed_size ⇒ Object (readonly)
Returns the value of attribute decompressed_size.
18 19 20 |
# File 'lib/zip/decompressor.rb', line 18 def decompressed_size @decompressed_size end |
#input_stream ⇒ Object (readonly)
Returns the value of attribute input_stream.
17 18 19 |
# File 'lib/zip/decompressor.rb', line 17 def input_stream @input_stream end |
Class Method Details
.decompressor_classes ⇒ Object
5 6 7 |
# File 'lib/zip/decompressor.rb', line 5 def self.decompressor_classes @decompressor_classes ||= {} end |
.find_by_compression_method(compression_method) ⇒ Object
13 14 15 |
# File 'lib/zip/decompressor.rb', line 13 def self.find_by_compression_method(compression_method) decompressor_classes[compression_method] end |
.register(compression_method, decompressor_class) ⇒ Object
9 10 11 |
# File 'lib/zip/decompressor.rb', line 9 def self.register(compression_method, decompressor_class) decompressor_classes[compression_method] = decompressor_class end |