Class: ZIMG::JPEG::DAC

Inherits:
Chunk show all
Defined in:
lib/zimg/jpeg/chunks.rb

Overview

Define Arithmetic Coding

Instance Attribute Summary collapse

Attributes inherited from Chunk

#data, #marker, #size

Instance Method Summary collapse

Methods inherited from Chunk

#crc, #export, #type

Methods inherited from Chunk

#cli_color

Constructor Details

#initialize(marker, io) ⇒ DAC

Returns a new instance of DAC.



271
272
273
274
# File 'lib/zimg/jpeg/chunks.rb', line 271

def initialize(marker, io)
  super
  @values = @data.unpack("C*").each_slice(2).to_a
end

Instance Attribute Details

#valuesObject (readonly)

Returns the value of attribute values.



269
270
271
# File 'lib/zimg/jpeg/chunks.rb', line 269

def values
  @values
end

Instance Method Details

#inspect(*args) ⇒ Object



276
277
278
# File 'lib/zimg/jpeg/chunks.rb', line 276

def inspect *args
  super.chop + format("values=%s>", values.inspect)
end