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.



98
99
100
# File 'lib/omnizip/formats/xz/reader.rb', line 98

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



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

def data
  @data
end

Instance Method Details

#readString

Read the decompressed data

Returns:

  • (String)

    Decompressed data



105
106
107
# File 'lib/omnizip/formats/xz/reader.rb', line 105

def read
  @data
end

#sizeInteger Also known as: bytesize

Get data size

Returns:

  • (Integer)

    Size in bytes



112
113
114
# File 'lib/omnizip/formats/xz/reader.rb', line 112

def size
  @data.bytesize
end