Class: Libpng::StandardDecoder::ReadState

Inherits:
Struct
  • Object
show all
Defined in:
lib/libpng/standard_decoder.rb

Overview

Read-state accumulator. The libpng read callback reads PNG bytes out of this; the offset advances with each call. Wrapping the state in a small struct keeps the FFI::Function closure capture explicit (and the closure itself becomes trivially shareable because the struct's instance vars are not mutated outside the callback).

Instance Attribute Summary collapse

Instance Attribute Details

#bytesObject

Returns the value of attribute bytes

Returns:

  • (Object)

    the current value of bytes



42
43
44
# File 'lib/libpng/standard_decoder.rb', line 42

def bytes
  @bytes
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



42
43
44
# File 'lib/libpng/standard_decoder.rb', line 42

def offset
  @offset
end