anchor.diff:  new_file_entry(State, Filename, FileSize, Mode, Timestamp, FileType) ->
       Padding = data_padding(State),
       Header = file_header(Filename, FileSize, Mode, Timestamp, FileType),
  -    append_data(State#state{current_file_bytes = 0}, deflate(State, <<Padding/binary, Header/binary>>)).
  +    write_to_buffer(State#state{current_file_size = 0}, <<Padding/binary, Header/binary>>).
   
   
   -spec append_to_file_content(state(), bytes()) -> state().
  
positive.code: %%% API
  %%%===================================================================
  
  -spec open_archive() -> state().
  open_archive() ->
      open_archive(#{gzip => true}).
  
  
  -spec open_archive(options()) -> state().
  open_archive(Options) ->
      ZStream = case maps:get(gzip, Options, false) of
          false -> undefined;
          true ->
  
negative.code: %%% @end
  %%%--------------------------------------------------------------------
  %%% @doc
  %%% This module contains utility functions allowing for creating TAR archives on-the-fly.
  %%% 
  %%% Module operates on state object and every function (except `close_archive_stream`) 
  %%% returns updated version of it. This updated state must be used in next call to this 
  %%% module. After `close_archive_stream` has been called, new state should be acquired 
  %%% using `open_archive_stream`.
  %%% For each file it is responsibility of a calling module to provide exactly FileSize 
  %%% bytes (as given in `new_file_entry`) in total in subsequent `append_to_file_content` 
  %%% calls.
  %%% 
  %%% Typical usage of this module is as follows: 
  %%%     1) `open_archive_stream`
  %%%     2) `new_file_entry`
  %%%     3) 0 or more calls to `append_to_file_content`
  %%%     4) repeat from 2) for each new file to add
  %%%     5) `close_archive_stream`
  %%% 
  %%% Any time between open and close `flush` function can be called to acquire bytes 
  %%% generated so far.
  %%%
  %%% When using this module with option gzip set to true, every call must be made from 
  %%% the same process.
  %%% @end
  %%%--------------------------------------------------------------------
  -module(tar_utils).
  -author("Michal Stanisz").
  
  %% API
  -export([open_archive_stream/0, open_archive_stream/1]).
  -export([new_file_entry/6]).
  -export([append_to_file_content/2, append_to_file_content/3]).
  -export([close_archive_stream/1]).
  -export([flush/1]).
  
  -define(BLOCK_SIZE, 512).
  -define(DIRECTORY_TYPE_FLAG, <<"5">>).
  