anchor.diff:  
   %% Encode the data so that the identity variant comes first and then the gzip'ed variant
   encode_data(Data) when is_binary(Data) ->
  -	{Data, zlib:gzip(Data)}.
  +    {Data, zlib:gzip(Data)}.
   
   decode_data(gzip, Data) when is_binary(Data) ->
       zlib:gzip(Data);
   decode_data(identity, Data) when is_binary(Data) ->
       Data;
   decode_data(identity, {Data, _Gzip}) ->
  -	Data;
  +    Data;
   decode_data(gzip, {_Data, Gzip}) ->
  -	Gzip.
  +    Gzip.
   
       
positive.code: service_available(ReqData, ConfigProps) ->
      Context = z_context:set(ConfigProps, z_context:new(ReqData)),
      Context1 = z_context:ensure_qs(z_context:continue_session(Context)),
      {_, ReqData1, ContextFile} = ensure_file_info(ReqData, Context1),
      ContextMime = case z_context:get(mime, ContextFile) of
          undefined ->
              Path = case z_context:get(path, Context) of
                  undefined -> mochiweb_util:unquote(wrq:disp_path(ReqData1));
                  ConfiguredPath -> ConfiguredPath
              end, 
              CT = z_media_identify:guess_mime(Path),
              z_context:set(mime, CT, ContextFile);
          _Mime -> 
              ContextFile
      end,
      
      case filelib:file_size(z_context:get(fullpath, ContextMime)) of
          N when N > ?CHUNKED_CONTENT_LENGTH ->
              ContextChunked = z_context:set([{chunked, true}, {file_size, N}], ContextMime), 
              ?WM_REPLY(true, ContextChunked);
          _ ->
              ?WM_REPLY(true, ContextMime)
      end.
  
  
  
negative.code: 
  encodings_provided(ReqData, Context) ->
      Encodings = case z_context:get(chunked, Context) of
                      true ->
                          [{"identity", fun(Data) -> Data end}];
                      _ ->
                          case z_context:get(mime, Context) of
                              "image/" ++ _ ->  [{"identity", fun(Data) -> Data end}];
                              "video/" ++ _ ->  [{"identity", fun(Data) -> Data end}];
                              "audio/" ++ _ ->  [{"identity", fun(Data) -> Data end}];
                              "application/x-gzip" ++ _ -> [{"identity", fun(Data) -> Data end}];
                              "applicationzip" ++ _ -> [{"identity", fun(Data) -> Data end}];
                              _ -> 
                                  [{"identity", fun(Data) -> decode_data(identity, Data) end},
                                   {"gzip",     fun(Data) -> decode_data(gzip, Data) end}]
                          end
                  end,
      {Encodings, ReqData, z_context:set(encode_data, length(Encodings) > 1, Context)}.
  
  resource_exists(ReqData, Context) ->
      {z_context:get(fullpath, Context) =/= undefined, ReqData, Context}.
  