class_docstr: Wraps an `HTTPMessageDelegate` to decode ``Content-Encoding: gzip``.
class_docstr_tok: ["Wraps","an","`","HTTPMessageDelegate","`","to","decode","``","Content-Encoding",":","gzip","``","."]
code: def headers_received(
      self,
      start_line: Union[
          httputil.RequestStartLine, httputil.ResponseStartLine
      ],
      headers: httputil.HTTPHeaders,
  ) -> Optional[Awaitable[None]]:
      if headers.get("Content-Encoding", "").lower() == "gzip":
          self._decompressor = GzipDecompressor()
          # Downstream delegates will only see uncompressed data,
          # so rename the content-encoding header.
          # (but note that curl_httpclient doesn't do this).
          headers.add(
              "X-Consumed-Content-Encoding", headers["Content-Encoding"]
          )
          del headers["Content-Encoding"]
      return self._delegate.headers_received(start_line, headers)
  
imports: import asyncio
  import logging
  import re
  import types
  from tornado.concurrent import Future, future_add_done_callback, future_set_result_unless_cancelled
  from tornado.escape import native_str, utf8
  from tornado import gen
  from tornado import httputil
  from tornado import iostream
  from tornado.log import gen_log, app_log
  from tornado.util import GzipDecompressor
  from typing import cast, Optional, Type, Awaitable, Callable, Union, Tuple
label_desc: Use image node_id 2 for calling the _GzipMessageDelegate obj's underlying member method code with example usage: obj.headers_received(start_line, headers) and returns: self