anchor.diff:      [];
   decompress_idx_to_k_list(Bin, KList) ->
       IdxBitsSize = bits_for_number(bits_for_number(length(KList))),
  -    <<SigSize:IdxBitsSize/integer-unit:1, Bin2/bitstring>> = Bin,
  +    <<SigSize0:IdxBitsSize/integer-unit:1, Bin2/bitstring>> = Bin,
  +    SigSize = erlang:max(1, SigSize0),
       decompress_idx_to_k_list_(Bin2, KList, SigSize).
   
   %% @doc Helper for decompress_idx_to_k_list/2.
  
positive.code: %%      into a list of keys from the original KV list.
  %%      NOTE: This is essentially the same as decompress_idx_to_k_list/2 but we
  %%            need the separation because of the opaque RT keys.
  -spec decompress_idx_to_kv_list(CompressedBin::bitstring(), KVList::db_chunk_kv())
          -> ResKeys::db_chunk_kv().
  decompress_idx_to_kv_list(<<>>, _KVList) ->
      [];
  decompress_idx_to_kv_list(Bin, KVList) ->
      IdxBitsSize = bits_for_number(bits_for_number(length(KVList) - 1)),
      <<SigSize:IdxBitsSize/integer-unit:1, Bin2/bitstring>> = Bin,
      decompress_idx_to_kv_list_(Bin2, KVList, SigSize).
  
  %% @doc Helper for decompress_idx_to_kv_list/2.
  
negative.code: decompress_idx_to_kv_list_(<<>>, _, _SigSize) ->
      [];
  decompress_idx_to_kv_list_(Bin, KVList, SigSize) ->
      <<KeyPosInc:SigSize/integer-unit:1, T/bitstring>> = Bin,
      [X | KVList2] = lists:nthtail(KeyPosInc, KVList),
      [X | decompress_idx_to_kv_list_(T, KVList2, SigSize)].
  
  