Class: ZipTricks::RemoteUncap::RemoteZipEntry
- Inherits:
-
Object
- Object
- ZipTricks::RemoteUncap::RemoteZipEntry
- Defined in:
- lib/zip_tricks/remote_uncap.rb
Overview
Represents a file embedded within a remote ZIP archive
Instance Attribute Summary collapse
-
#compression_method ⇒ Fixnum
Compression method (0 for stored, 8 for deflate).
-
#ends_at_offset ⇒ Fixnum
Where the file data ends within the zip.
-
#name ⇒ String
Filename of the file in the remote ZIP.
-
#size_compressed ⇒ Fixnum
Size in bytes of the file when compressed (the segment in the ZIP).
-
#size_uncompressed ⇒ Fixnum
Size in bytes of the file when uncompressed.
-
#starts_at_offset ⇒ Fixnum
Where the file data starts within the ZIP.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ RemoteZipEntry
constructor
Yields the object during initialization.
Constructor Details
#initialize {|_self| ... } ⇒ RemoteZipEntry
Yields the object during initialization
33 34 35 |
# File 'lib/zip_tricks/remote_uncap.rb', line 33 def initialize yield self end |
Instance Attribute Details
#compression_method ⇒ Fixnum
Returns compression method (0 for stored, 8 for deflate).
23 24 25 |
# File 'lib/zip_tricks/remote_uncap.rb', line 23 def compression_method @compression_method end |
#ends_at_offset ⇒ Fixnum
Returns where the file data ends within the zip. Will be equal to starts_at_offset if the file is empty.
30 31 32 |
# File 'lib/zip_tricks/remote_uncap.rb', line 30 def ends_at_offset @ends_at_offset end |
#name ⇒ String
Returns filename of the file in the remote ZIP.
14 15 16 |
# File 'lib/zip_tricks/remote_uncap.rb', line 14 def name @name end |
#size_compressed ⇒ Fixnum
Returns size in bytes of the file when compressed (the segment in the ZIP).
20 21 22 |
# File 'lib/zip_tricks/remote_uncap.rb', line 20 def size_compressed @size_compressed end |
#size_uncompressed ⇒ Fixnum
Returns size in bytes of the file when uncompressed.
17 18 19 |
# File 'lib/zip_tricks/remote_uncap.rb', line 17 def size_uncompressed @size_uncompressed end |
#starts_at_offset ⇒ Fixnum
Returns where the file data starts within the ZIP.
26 27 28 |
# File 'lib/zip_tricks/remote_uncap.rb', line 26 def starts_at_offset @starts_at_offset end |