lib/gziprb/deflate.rb
# Create a pair of classes that encapsulate reading/writing lengths and distances; a reader
# takes a base code, and optionally reads extra bits to add to a corresponding base value, a
# writer takes a value and converts it into a code and optional extra bits.
Create a pair of classes that encapsulate reading/writing lengths and distances; a reader
takes a base code, and optionally reads extra bits to add to a corresponding base value, a
writer takes a value and converts it into a code and optional extra bits.
Create a pair of classes that encapsulate reading / writing lengths and distances ; a reader takes a base code and optionally reads extra bits to add to a corresponding base value a writer takes a value and converts it into a code and optional extra bits .
def define_code_reader_and_writer(bases:, extra_bits:, code_range:, value_range:)
      extra_bits.freeze
      bases.freeze
      args = {
        bases: bases,
        extra_bits: extra_bits,
        code_range: code_range,
      }
      [define_code_reader(**args), define_code_writer(**args, value_range: value_range)]
    end
def define_code_reader_and_writer ( bases : , extra_bits : , code_range : , value_range : ) extra_bits . freeze bases . freeze args = { bases : bases , extra_bits : extra_bits , code_range : code_range , } [ define_code_reader ( ** args ) , define_code_writer ( ** args , value_range : value_range ) ] end
Create a pair of classes that encapsulate reading/writing lengths and distances; a reader
takes a base code, and optionally reads extra bits to add to a corresponding base value, a
writer takes a value and converts it into a code and optional extra bits.
Create a pair of classes that encapsulate reading / writing lengths and distances ; a reader takes a base code and optionally reads extra bits to add to a corresponding base value a writer takes a value and converts it into a code and optional extra bits .
bases
extra_bits
code_range
value_range