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.
21 22 23 24 25 26 |
# File 'lib/zip/decompressor.rb', line 21 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.
19 20 21 |
# File 'lib/zip/decompressor.rb', line 19 def decompressed_size @decompressed_size end |
#input_stream ⇒ Object (readonly)
Returns the value of attribute input_stream.
19 20 21 |
# File 'lib/zip/decompressor.rb', line 19 def input_stream @input_stream end |
Class Method Details
.decompressor_classes ⇒ Object
7 8 9 |
# File 'lib/zip/decompressor.rb', line 7 def self.decompressor_classes @decompressor_classes ||= {} end |
.find_by_compression_method(compression_method) ⇒ Object
15 16 17 |
# File 'lib/zip/decompressor.rb', line 15 def self.find_by_compression_method(compression_method) decompressor_classes[compression_method] end |
.register(compression_method, decompressor_class) ⇒ Object
11 12 13 |
# File 'lib/zip/decompressor.rb', line 11 def self.register(compression_method, decompressor_class) decompressor_classes[compression_method] = decompressor_class end |