anchor.diff:  
   encode_string(Bin) ->
       HuffmanLength = huffman:encode_length(Bin),
  +    encode_length(Bin, HuffmanLength).
  +
  +encode_length(Bin, HuffmanLength) when HuffmanLength < size(Bin) ->
  +    Buf = encode_integer(HuffmanLength, 7, 16#80),
  +    Buf2 = huffman:encode(Bin),
  +    <<Buf/binary, Buf2/binary>>;
  +encode_length(Bin, _) ->
       Size = size(Bin),
  -    case HuffmanLength < Size of
  -        true ->
  -            Buf = encode_integer(HuffmanLength, 7, 16#80),
  -            Buf2 = huffman:encode(Bin),
  -            <<Buf/binary, Buf2/binary>>;
  -        false ->
  -            Buf = encode_integer(Size, 7, 0),
  -            <<Buf/binary, Bin/binary>>
  -    end.
  +    Buf = encode_integer(Size, 7, 0),
  +    <<Buf/binary, Bin/binary>>.
   
   %% decoder
   
  
positive.code: encode_index(N) ->
      encode_integer(N, 7, 16#80).
  
  encode_indname(N, Value, DoIndexing) ->
      {Prefix, FirstByte} = case DoIndexing of
                                true ->
                                    {6, 16#40};
                                false ->
                                    {4, 0}
                            end,
      Buf = encode_integer(N, Prefix, FirstByte),
      Buf2 = encode_string(Value),
      <<Buf/binary, Buf2/binary>>.
  
  encode_newname(Name, Value, DoIndexing) ->
      FirstByte = case DoIndexing of
                      true ->
                          16#40;
                      false ->
                          0
                  end,
      Buf = <<FirstByte>>,
      Buf2 = encode_string(Name),
      Buf3 = encode_string(Value),
  
negative.code:             {Buf, Encoder#hpackencoder{context=Context2}}
      end.
  
  try_add_header(Name, Value, Context) ->
      DoIndexing = header:should_index(Name, Value, Context),
      try_add_header(Name, Value, DoIndexing, Context).
  
  try_add_header(Name, Value, true, Context) ->
      {ok, Context2} = header:add(Name, Value, Context),
      {true, Context2};
  try_add_header(_Name, _Value, false, Context) ->
      {false, Context}.
  
  encode_table_size(Size) ->
      encode_integer(Size, 5, 16#20).
  