anchor.diff:                  {<<>>, []},
                   Data).
   
  +-type tcp_segment() :: {RSN::non_neg_integer(),
  +                        Timestamp::non_neg_integer(),
  +                        Data::binary()}.
  +
  +-type offset_data() :: {Timestamp::non_neg_integer(),
  +                        'syn' | 'normal' | 'retransmit' | 'missing_packet',
  +                        StartIdx::non_neg_integer(),
  +                        StopIdx::non_neg_integer()}.
  +
  +-spec reassemble(tcp_segment(), {Data::binary(), [offset_data()]}) ->
  +                        {Data::binary(), [offset_data()]}.
   reassemble({0, TS, Data}, {<<>>, []}) ->
       {Data, [{TS, syn, 0, 0}]};
   reassemble({RSN, RTS, Data}, {Stream, Offsets})
  
positive.code:                      data = [] :: [{RSN::non_neg_integer(),
                                      TS::non_neg_integer(),
                                      Data::binary()}],
                       state = closed :: 'closed' | 'established' | 'error'
                      }).
  
  -spec init(TS::non_neg_integer(), #tcp{}) -> #tcp_stream{}.
  init(TS, #tcp{syn=true, seq_no=ISN, data= D}) ->
      #tcp_stream{isn=ISN, start_time=TS,
                  data = [{0, TS, D}],
                  state = established}.
  
  update(TS, Pkt = #tcp{seq_no = S, data = Data},
         S0 = #tcp_stream{isn=ISN,
                          data=Acc, state=established}) ->
      RelativeSN = S - ISN,
  
negative.code:             I =< Idx,
              Idx =< J ].
  
  oddballs(Offsets) ->
      [ {TS, Type} || {TS, Type, _, _} <- Offsets,
                      Type =/= normal, Type =/= syn ].
  %%====================================================================
  %% Internal functions
  %%====================================================================
  