     do: 1 + varint_byte_size(value >>> 8)
   defp varint_byte_size(value) when value < -128,
     do: varint_byte_size(-value - 1)
-
-  defp encode_bytes(bytes) do
-    <<byte_size(bytes)::32>> <> bytes
-  end
 
   @compile {:inline, decode_base16: 1}
   defp decode_base16(value) do


    encode_consistency_level(consistency) <>
      <<flags>> <>
      encode_values(values) <>
      <<page_size::32>> <>
      encode_paging_state(paging_state)
  end

    end
  end

  defp encode_query_values(values) when values == [] or map_size(values) == 0 do
    <<>>
  end

  defp encode_query_values(values) when is_list(values) do
    for value <- values, into: <<length(values)::16>> do
      encode_query_value(value)
    end
  end

  defp encode_query_values(values) when is_map(values) do
    for {name, value} <- values, into: <<map_size(values)::16>> do
      name = to_string(name)
      <<byte_size(name)::16>> <> name <>
        encode_query_value(value)
    end
  end

