module ChunkyPNG::Chunk
def self.read(io)
-
(ChunkyPNG::Chung::Base)
- The loaded chunk instance.
Parameters:
-
io
(IO, #read
) -- The IO stream to read from.
def self.read(io) length, type = io.read(8).unpack('Na4') content = io.read(length) crc = io.read(4).unpack('N').first verify_crc!(type, content, crc) CHUNK_TYPES.fetch(type, Generic).read(type, content) end