def decode_spec(spec)
      new_bit_index  = @bit_index + spec[:bit_index].to_i + spec[:byte_index].to_i * 8
      
      if !spec[:bit_length] && !spec[:byte_length]
        new_bit_length = @bit_length - (new_bit_index - @bit_index)
      else
        new_bit_length = spec[:bit_length].to_i + spec[:byte_length].to_i * 8
      end
      
      return new_bit_index, new_bit_length
    end
def decode_spec(spec)
      new_bit_index  = @bit_index + spec[:bit_index].to_i + spec[:byte_index].to_i * 8
      
      if !spec[:bit_length] && !spec[:byte_length]
        new_bit_length = @bit_length - (new_bit_index - @bit_index)
      else
        new_bit_length = spec[:bit_length].to_i + spec[:byte_length].to_i * 8
      end
      
      return new_bit_index, new_bit_length
    end
Sub methods (helpers)