Class: Omnizip::Formats::Xz::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/omnizip/formats/xz/reader.rb

Overview

Entry class for extract API compatibility XZ format is a single stream, so this is a simple wrapper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Entry

Returns a new instance of Entry.



96
97
98
# File 'lib/omnizip/formats/xz/reader.rb', line 96

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



94
95
96
# File 'lib/omnizip/formats/xz/reader.rb', line 94

def data
  @data
end

Instance Method Details

#readString

Read the decompressed data

Returns:

  • (String)

    Decompressed data



103
104
105
# File 'lib/omnizip/formats/xz/reader.rb', line 103

def read
  @data
end

#sizeInteger Also known as: bytesize

Get data size

Returns:

  • (Integer)

    Size in bytes



110
111
112
# File 'lib/omnizip/formats/xz/reader.rb', line 110

def size
  @data.bytesize
end