anchor.diff:  % implemented with below boundaries.
   -define(MIN_SEND_RETRY_DELAY, 100).
   -define(MAX_SEND_RETRY_DELAY, 1000).
  -
  --type read_block_size() :: non_neg_integer().
  --type encoding_fun() :: fun((Data :: binary()) -> EncodedData :: binary()).
  --opaque download_ctx() :: #download_ctx{}.
  -
  --export_type([read_block_size/0, download_ctx/0]).
   
   %%%===================================================================
   %%% API
  
positive.code:     }, Req, ?MIN_SEND_RETRY_DELAY, 0).
  
  
  -spec send_data_chunk(Data :: binary(), cowboy_req:req()) -> NextRetryDelay :: time:millis().
  send_data_chunk(Data, Req) ->
      send_data_chunk(Data, Req, ?MAX_DOWNLOAD_BUFFER_SIZE div ?DEFAULT_READ_BLOCK_SIZE, ?MIN_SEND_RETRY_DELAY).
  
  
negative.code:             NextSendRetryDelay = send_data_chunk(BytesToSend, Req, MaxReadBlocksCount, SendRetryDelay),
              stream_bytes_range_internal(
                  {From + DataSize, To},
                  DownloadCtx#streaming_ctx{file_handle = NewFileHandle, tar_stream = FinalTarStream},
                  Req, NextSendRetryDelay, ReadBytes + DataSize
              )
      end.
  