Class: ZPNG::Chunk::ZTXT
- Inherits:
-
TextChunk
- Object
- ZPNG::Chunk
- TextChunk
- ZPNG::Chunk::ZTXT
- Defined in:
- lib/zpng/text_chunk.rb
Constant Summary
Constants inherited from TextChunk
Constants inherited from ZPNG::Chunk
Instance Attribute Summary collapse
-
#cmethod ⇒ Object
compression method.
Attributes inherited from TextChunk
Attributes inherited from ZPNG::Chunk
#crc, #data, #idx, #offset, #size, #type
Instance Method Summary collapse
-
#initialize(*args) ⇒ ZTXT
constructor
A new instance of ZTXT.
Methods inherited from TextChunk
Methods inherited from ZPNG::Chunk
#check, #crc_ok?, #export, #export_data, #fix_crc!, from_stream, #inspect, #valid?
Methods included from DeepCopyable
Constructor Details
#initialize(*args) ⇒ ZTXT
Returns a new instance of ZTXT.
44 45 46 47 48 49 50 51 |
# File 'lib/zpng/text_chunk.rb', line 44 def initialize *args super @keyword,@cmethod,@text = data.unpack('Z*Ca*') # current only @cmethod value is 0 - deflate if @text @text = Zlib::Inflate.inflate(@text) end end |
Instance Attribute Details
#cmethod ⇒ Object
compression method
43 44 45 |
# File 'lib/zpng/text_chunk.rb', line 43 def cmethod @cmethod end |