class ChunkyPNG::Chunk::CompressedText
def self.read(type, content)
def self.read(type, content) keyword, compression, value = content.unpack('Z*Ca*') raise "Compression method #{compression.inspect} not supported!" unless compression == ChunkyPNG::COMPRESSION_DEFAULT new(keyword, Zlib::Inflate.inflate(value)) end
def content
def content [keyword, ChunkyPNG::COMPRESSION_DEFAULT, Zlib::Deflate.deflate(value)].pack('Z*Ca*') end
def initialize(keyword, value)
def initialize(keyword, value) super('tEXt') @keyword, @value = keyword, value end