The PHP half: the six functions and the three encoding constants.
Defined only when the bridge resolves. Returning FALSE
from every call on a host with no bridge would let AssetDumper write a
zero-byte .gz next to a real .css and serve it as gzip, which is a broken
site that looks fine in the logs. An undefined function is loud, and a build
that has no bridge has no database either.
Which functions: every zlib call site in Drupal 11.4.5 outside tests, found by
grep over the whole tree: Asset\AssetDumper::dump() calls
gzencode($data, 9, FORCE_GZIP); Component\Utility\UrlHelper calls
gzcompress() and @gzuncompress(). gzdecode, gzdeflate and gzinflate
are carried because they are the inverses of the three that are reached and a
codec that can encode a form it cannot decode is a defect, not a saving.
What is not covered, all three out of reach of a synchronous
bridge or off the served path: gzopen() and the rest of the stream family
(pear/archive_tar, the update manager's tarballs), gzencode/gzdecode in
symfony/http-kernel's profiler storage, and the compress.zlib:// stream
wrapper named by Core\Command\DbImportCommand. A stream wrapper is a
separate mechanism from a function, and none of the three runs while a page is
being served.
The PHP half: the six functions and the three encoding constants.
Defined only when the bridge resolves. Returning FALSE from every call on a host with no bridge would let
AssetDumperwrite a zero-byte.gznext to a real.cssand serve it as gzip, which is a broken site that looks fine in the logs. An undefined function is loud, and a build that has no bridge has no database either.Which functions: every zlib call site in Drupal 11.4.5 outside tests, found by grep over the whole tree:
Asset\AssetDumper::dump()callsgzencode($data, 9, FORCE_GZIP);Component\Utility\UrlHelpercallsgzcompress()and@gzuncompress().gzdecode,gzdeflateandgzinflateare carried because they are the inverses of the three that are reached and a codec that can encode a form it cannot decode is a defect, not a saving.What is not covered, all three out of reach of a synchronous bridge or off the served path:
gzopen()and the rest of the stream family (pear/archive_tar, the update manager's tarballs),gzencode/gzdecodeinsymfony/http-kernel's profiler storage, and thecompress.zlib://stream wrapper named byCore\Command\DbImportCommand. A stream wrapper is a separate mechanism from a function, and none of the three runs while a page is being served.