Class: ZipTricks::RemoteUncap::RemoteZipEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/zip_tricks/remote_uncap.rb

Overview

Represents a file embedded within a remote ZIP archive

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ RemoteZipEntry

Yields the object during initialization

Yields:

  • (_self)

Yield Parameters:



33
34
35
# File 'lib/zip_tricks/remote_uncap.rb', line 33

def initialize
  yield self
end

Instance Attribute Details

#compression_methodFixnum

Returns compression method (0 for stored, 8 for deflate).

Returns:

  • (Fixnum)

    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_offsetFixnum

Returns where the file data ends within the zip. Will be equal to starts_at_offset if the file is empty.

Returns:

  • (Fixnum)

    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

#nameString

Returns filename of the file in the remote ZIP.

Returns:

  • (String)

    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_compressedFixnum

Returns size in bytes of the file when compressed (the segment in the ZIP).

Returns:

  • (Fixnum)

    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_uncompressedFixnum

Returns size in bytes of the file when uncompressed.

Returns:

  • (Fixnum)

    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_offsetFixnum

Returns where the file data starts within the ZIP.

Returns:

  • (Fixnum)

    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