anchor.diff:  		N when N =< 16#7fffffffffffffff -> << 127:7, N:64 >>
   	end.
   
  -deflate_frame(Payload, Deflate) ->
  +deflate_frame(Payload, Deflate, TakeOver) ->
   	Deflated = iolist_to_binary(zlib:deflate(Deflate, Payload, sync)),
  +	case TakeOver of
  +		no_takeover -> zlib:deflateReset(Deflate);
  +		takeover -> ok
  +	end,
   	Len = byte_size(Deflated) - 4,
   	case Deflated of
   		<< Body:Len/binary, 0:8, 0:8, 255:8, 255:8 >> -> Body;
  
positive.code: -type mask_key() :: undefined | 0..16#ffffffff.
  -type rsv() :: <<_:3>>.
  -type utf8_state() :: <<>> | <<_:8>> | <<_:16>> | <<_:24>>.
  
  %% @doc Parse and validate the Websocket frame header.
  %%
  
negative.code: %% that defines meanings for non-zero values.
  parse_header(<< _:1, Rsv:3, _/bits >>, Extensions, _) when Extensions =:= #{}, Rsv =/= 0 -> error;
  %% Last 2 RSV bits MUST be 0 if deflate-frame extension is used.
  parse_header(<< _:2, 1:1, _/bits >>, #{deflate := _}, _) -> error;
  parse_header(<< _:3, 1:1, _/bits >>, #{deflate := _}, _) -> error;
  %% Invalid opcode. Note that these opcodes may be used by extensions.
  parse_header(<< _:4, 3:4, _/bits >>, _, _) -> error;
  parse_header(<< _:4, 4:4, _/bits >>, _, _) -> error;
  