Class: Btape::GifEncoder::LzwCompressor::State
- Inherits:
-
Struct
- Object
- Struct
- Btape::GifEncoder::LzwCompressor::State
- Defined in:
- lib/btape/lzw_compressor.rb
Overview
Mutable state threaded through compress/advance: the growing code dictionary, the next free code, the current code width in bits, and whether a width bump is owed (see #advance).
Instance Attribute Summary collapse
-
#code_width ⇒ Object
Returns the value of attribute code_width.
-
#dictionary ⇒ Object
Returns the value of attribute dictionary.
-
#next_code ⇒ Object
Returns the value of attribute next_code.
-
#pending_width_bump ⇒ Object
Returns the value of attribute pending_width_bump.
Instance Attribute Details
#code_width ⇒ Object
Returns the value of attribute code_width
16 17 18 |
# File 'lib/btape/lzw_compressor.rb', line 16 def code_width @code_width end |
#dictionary ⇒ Object
Returns the value of attribute dictionary
16 17 18 |
# File 'lib/btape/lzw_compressor.rb', line 16 def dictionary @dictionary end |
#next_code ⇒ Object
Returns the value of attribute next_code
16 17 18 |
# File 'lib/btape/lzw_compressor.rb', line 16 def next_code @next_code end |
#pending_width_bump ⇒ Object
Returns the value of attribute pending_width_bump
16 17 18 |
# File 'lib/btape/lzw_compressor.rb', line 16 def pending_width_bump @pending_width_bump end |