anchor.diff:                                 CMeta = binary_to_term(CMetaBin),
                                  CMeta ++ Headers ++ CustomHeaders
                          end,
  -            BodyFunc = fun(Socket, Transport) ->
  -                               leo_net:chunked_send(
  -                                 Transport, Socket, RespObject, SendChunkLen)
  -                       end,
  -
  -            ?access_log_get(BucketName, Key, Meta#?METADATA.dsize, ?HTTP_ST_OK, BeginTime),
  -            ?reply_ok(Headers2, {Meta#?METADATA.dsize, BodyFunc}, Req);
  +
  +            case can_gzip(Req) of
  +                true ->
  +                    ?access_log_get(BucketName, Key, Meta#?METADATA.dsize, ?HTTP_ST_OK, BeginTime),
  +                    ?reply_ok(Headers2, RespObject, Req);
  +                false ->
  +                    BodyFunc = fun(Socket, Transport) ->
  +                                    leo_net:chunked_send(
  +                                      Transport, Socket, RespObject, SendChunkLen),
  +                                    ?access_log_get(BucketName, Key, Meta#?METADATA.dsize, ?HTTP_ST_OK, BeginTime)
  +                               end,
  +                    ?reply_ok(Headers2, {Meta#?METADATA.dsize, BodyFunc}, Req)
  +            end;
   
           %% MISS: get an object from storage (large-size)
           {ok, #?METADATA{cnumber = TotalChunkedObjs,
  
positive.code:                                CMeta ++ Headers ++ CustomHeaders
                         end,
  
              BodyFunc = fun(Socket, Transport) ->
                                 leo_net:chunked_send(
                                   Transport, Socket, RespObject, SendChunkLen),
                                 ?access_log_get(BucketName, Key, Meta#?METADATA.dsize, ?HTTP_ST_OK, BeginTime)
                         end,
  
              ?reply_ok(Headers2, {Meta#?METADATA.dsize, BodyFunc}, Req);
  
          %% For a chunked object.
          {ok, #?METADATA{cnumber = TotalChunkedObjs,
  
negative.code:                                CMeta ++ Headers ++ CustomHeaders
                         end,
  
              case can_gzip(Req) of
                  true ->
                      ?access_log_get(BucketName, Key, CacheObj#cache.size, ?HTTP_ST_OK, BeginTime, "hit:mem-cache"),
                      ?reply_ok(Headers2, CacheObj#cache.body, Req);
                  false ->
                      BodyFunc = fun(Socket, Transport) ->
                                         leo_net:chunked_send(
                                           Transport, Socket, CacheObj#cache.body, SendChunkLen),
                                         ?access_log_get(BucketName, Key, CacheObj#cache.size, ?HTTP_ST_OK, BeginTime, "hit:mem-cache")
                                 end,
                      ?reply_ok(Headers2, {CacheObj#cache.size, BodyFunc}, Req)
              end;
  
          %% MISS: For the case If-Modified-Since matches timestamp in metadata
          {ok, #?METADATA{timestamp = IMSSec}, _Resp} ->
  