17db96d56Sopenharmony_ci:mod:`zlib` --- Compression compatible with :program:`gzip`
27db96d56Sopenharmony_ci===========================================================
37db96d56Sopenharmony_ci
47db96d56Sopenharmony_ci.. module:: zlib
57db96d56Sopenharmony_ci   :synopsis: Low-level interface to compression and decompression routines
67db96d56Sopenharmony_ci              compatible with gzip.
77db96d56Sopenharmony_ci
87db96d56Sopenharmony_ci--------------
97db96d56Sopenharmony_ci
107db96d56Sopenharmony_ciFor applications that require data compression, the functions in this module
117db96d56Sopenharmony_ciallow compression and decompression, using the zlib library. The zlib library
127db96d56Sopenharmony_cihas its own home page at https://www.zlib.net.   There are known
137db96d56Sopenharmony_ciincompatibilities between the Python module and versions of the zlib library
147db96d56Sopenharmony_ciearlier than 1.1.3; 1.1.3 has a `security vulnerability <https://zlib.net/zlib_faq.html#faq33>`_, so we recommend using
157db96d56Sopenharmony_ci1.1.4 or later.
167db96d56Sopenharmony_ci
177db96d56Sopenharmony_cizlib's functions have many options and often need to be used in a particular
187db96d56Sopenharmony_ciorder.  This documentation doesn't attempt to cover all of the permutations;
197db96d56Sopenharmony_ciconsult the zlib manual at http://www.zlib.net/manual.html for authoritative
207db96d56Sopenharmony_ciinformation.
217db96d56Sopenharmony_ci
227db96d56Sopenharmony_ciFor reading and writing ``.gz`` files see the :mod:`gzip` module.
237db96d56Sopenharmony_ci
247db96d56Sopenharmony_ciThe available exception and functions in this module are:
257db96d56Sopenharmony_ci
267db96d56Sopenharmony_ci
277db96d56Sopenharmony_ci.. exception:: error
287db96d56Sopenharmony_ci
297db96d56Sopenharmony_ci   Exception raised on compression and decompression errors.
307db96d56Sopenharmony_ci
317db96d56Sopenharmony_ci
327db96d56Sopenharmony_ci.. function:: adler32(data[, value])
337db96d56Sopenharmony_ci
347db96d56Sopenharmony_ci   Computes an Adler-32 checksum of *data*.  (An Adler-32 checksum is almost as
357db96d56Sopenharmony_ci   reliable as a CRC32 but can be computed much more quickly.)  The result
367db96d56Sopenharmony_ci   is an unsigned 32-bit integer.  If *value* is present, it is used as
377db96d56Sopenharmony_ci   the starting value of the checksum; otherwise, a default value of 1
387db96d56Sopenharmony_ci   is used.  Passing in *value* allows computing a running checksum over the
397db96d56Sopenharmony_ci   concatenation of several inputs.  The algorithm is not cryptographically
407db96d56Sopenharmony_ci   strong, and should not be used for authentication or digital signatures.  Since
417db96d56Sopenharmony_ci   the algorithm is designed for use as a checksum algorithm, it is not suitable
427db96d56Sopenharmony_ci   for use as a general hash algorithm.
437db96d56Sopenharmony_ci
447db96d56Sopenharmony_ci   .. versionchanged:: 3.0
457db96d56Sopenharmony_ci      The result is always unsigned.
467db96d56Sopenharmony_ci
477db96d56Sopenharmony_ci.. function:: compress(data, /, level=-1, wbits=MAX_WBITS)
487db96d56Sopenharmony_ci
497db96d56Sopenharmony_ci   Compresses the bytes in *data*, returning a bytes object containing compressed data.
507db96d56Sopenharmony_ci   *level* is an integer from ``0`` to ``9`` or ``-1`` controlling the level of compression;
517db96d56Sopenharmony_ci   ``1`` (Z_BEST_SPEED) is fastest and produces the least compression, ``9`` (Z_BEST_COMPRESSION)
527db96d56Sopenharmony_ci   is slowest and produces the most.  ``0`` (Z_NO_COMPRESSION) is no compression.
537db96d56Sopenharmony_ci   The default value is ``-1`` (Z_DEFAULT_COMPRESSION).  Z_DEFAULT_COMPRESSION represents a default
547db96d56Sopenharmony_ci   compromise between speed and compression (currently equivalent to level 6).
557db96d56Sopenharmony_ci
567db96d56Sopenharmony_ci   .. _compress-wbits:
577db96d56Sopenharmony_ci
587db96d56Sopenharmony_ci   The *wbits* argument controls the size of the history buffer (or the
597db96d56Sopenharmony_ci   "window size") used when compressing data, and whether a header and
607db96d56Sopenharmony_ci   trailer is included in the output.  It can take several ranges of values,
617db96d56Sopenharmony_ci   defaulting to ``15`` (MAX_WBITS):
627db96d56Sopenharmony_ci
637db96d56Sopenharmony_ci   * +9 to +15: The base-two logarithm of the window size, which
647db96d56Sopenharmony_ci     therefore ranges between 512 and 32768.  Larger values produce
657db96d56Sopenharmony_ci     better compression at the expense of greater memory usage.  The
667db96d56Sopenharmony_ci     resulting output will include a zlib-specific header and trailer.
677db96d56Sopenharmony_ci
687db96d56Sopenharmony_ci   * −9 to −15: Uses the absolute value of *wbits* as the
697db96d56Sopenharmony_ci     window size logarithm, while producing a raw output stream with no
707db96d56Sopenharmony_ci     header or trailing checksum.
717db96d56Sopenharmony_ci
727db96d56Sopenharmony_ci   * +25 to +31 = 16 + (9 to 15): Uses the low 4 bits of the value as the
737db96d56Sopenharmony_ci     window size logarithm, while including a basic :program:`gzip` header
747db96d56Sopenharmony_ci     and trailing checksum in the output.
757db96d56Sopenharmony_ci
767db96d56Sopenharmony_ci   Raises the :exc:`error` exception if any error occurs.
777db96d56Sopenharmony_ci
787db96d56Sopenharmony_ci   .. versionchanged:: 3.6
797db96d56Sopenharmony_ci      *level* can now be used as a keyword parameter.
807db96d56Sopenharmony_ci
817db96d56Sopenharmony_ci   .. versionchanged:: 3.11
827db96d56Sopenharmony_ci      The *wbits* parameter is now available to set window bits and
837db96d56Sopenharmony_ci      compression type.
847db96d56Sopenharmony_ci
857db96d56Sopenharmony_ci.. function:: compressobj(level=-1, method=DEFLATED, wbits=MAX_WBITS, memLevel=DEF_MEM_LEVEL, strategy=Z_DEFAULT_STRATEGY[, zdict])
867db96d56Sopenharmony_ci
877db96d56Sopenharmony_ci   Returns a compression object, to be used for compressing data streams that won't
887db96d56Sopenharmony_ci   fit into memory at once.
897db96d56Sopenharmony_ci
907db96d56Sopenharmony_ci   *level* is the compression level -- an integer from ``0`` to ``9`` or ``-1``.
917db96d56Sopenharmony_ci   A value of ``1`` (Z_BEST_SPEED) is fastest and produces the least compression,
927db96d56Sopenharmony_ci   while a value of ``9`` (Z_BEST_COMPRESSION) is slowest and produces the most.
937db96d56Sopenharmony_ci   ``0`` (Z_NO_COMPRESSION) is no compression.  The default value is ``-1`` (Z_DEFAULT_COMPRESSION).
947db96d56Sopenharmony_ci   Z_DEFAULT_COMPRESSION represents a default compromise between speed and compression
957db96d56Sopenharmony_ci   (currently equivalent to level 6).
967db96d56Sopenharmony_ci
977db96d56Sopenharmony_ci   *method* is the compression algorithm. Currently, the only supported value is
987db96d56Sopenharmony_ci   :const:`DEFLATED`.
997db96d56Sopenharmony_ci
1007db96d56Sopenharmony_ci   The *wbits* parameter controls the size of the history buffer (or the
1017db96d56Sopenharmony_ci   "window size"), and what header and trailer format will be used. It has
1027db96d56Sopenharmony_ci   the same meaning as `described for compress() <#compress-wbits>`__.
1037db96d56Sopenharmony_ci
1047db96d56Sopenharmony_ci   The *memLevel* argument controls the amount of memory used for the
1057db96d56Sopenharmony_ci   internal compression state. Valid values range from ``1`` to ``9``.
1067db96d56Sopenharmony_ci   Higher values use more memory, but are faster and produce smaller output.
1077db96d56Sopenharmony_ci
1087db96d56Sopenharmony_ci   *strategy* is used to tune the compression algorithm. Possible values are
1097db96d56Sopenharmony_ci   :const:`Z_DEFAULT_STRATEGY`, :const:`Z_FILTERED`, :const:`Z_HUFFMAN_ONLY`,
1107db96d56Sopenharmony_ci   :const:`Z_RLE` (zlib 1.2.0.1) and :const:`Z_FIXED` (zlib 1.2.2.2).
1117db96d56Sopenharmony_ci
1127db96d56Sopenharmony_ci   *zdict* is a predefined compression dictionary. This is a sequence of bytes
1137db96d56Sopenharmony_ci   (such as a :class:`bytes` object) containing subsequences that are expected
1147db96d56Sopenharmony_ci   to occur frequently in the data that is to be compressed. Those subsequences
1157db96d56Sopenharmony_ci   that are expected to be most common should come at the end of the dictionary.
1167db96d56Sopenharmony_ci
1177db96d56Sopenharmony_ci   .. versionchanged:: 3.3
1187db96d56Sopenharmony_ci      Added the *zdict* parameter and keyword argument support.
1197db96d56Sopenharmony_ci
1207db96d56Sopenharmony_ci
1217db96d56Sopenharmony_ci.. function:: crc32(data[, value])
1227db96d56Sopenharmony_ci
1237db96d56Sopenharmony_ci   .. index::
1247db96d56Sopenharmony_ci      single: Cyclic Redundancy Check
1257db96d56Sopenharmony_ci      single: checksum; Cyclic Redundancy Check
1267db96d56Sopenharmony_ci
1277db96d56Sopenharmony_ci   Computes a CRC (Cyclic Redundancy Check) checksum of *data*. The
1287db96d56Sopenharmony_ci   result is an unsigned 32-bit integer. If *value* is present, it is used
1297db96d56Sopenharmony_ci   as the starting value of the checksum; otherwise, a default value of 0
1307db96d56Sopenharmony_ci   is used.  Passing in *value* allows computing a running checksum over the
1317db96d56Sopenharmony_ci   concatenation of several inputs.  The algorithm is not cryptographically
1327db96d56Sopenharmony_ci   strong, and should not be used for authentication or digital signatures.  Since
1337db96d56Sopenharmony_ci   the algorithm is designed for use as a checksum algorithm, it is not suitable
1347db96d56Sopenharmony_ci   for use as a general hash algorithm.
1357db96d56Sopenharmony_ci
1367db96d56Sopenharmony_ci   .. versionchanged:: 3.0
1377db96d56Sopenharmony_ci      The result is always unsigned.
1387db96d56Sopenharmony_ci
1397db96d56Sopenharmony_ci.. function:: decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
1407db96d56Sopenharmony_ci
1417db96d56Sopenharmony_ci   Decompresses the bytes in *data*, returning a bytes object containing the
1427db96d56Sopenharmony_ci   uncompressed data.  The *wbits* parameter depends on
1437db96d56Sopenharmony_ci   the format of *data*, and is discussed further below.
1447db96d56Sopenharmony_ci   If *bufsize* is given, it is used as the initial size of the output
1457db96d56Sopenharmony_ci   buffer.  Raises the :exc:`error` exception if any error occurs.
1467db96d56Sopenharmony_ci
1477db96d56Sopenharmony_ci   .. _decompress-wbits:
1487db96d56Sopenharmony_ci
1497db96d56Sopenharmony_ci   The *wbits* parameter controls the size of the history buffer
1507db96d56Sopenharmony_ci   (or "window size"), and what header and trailer format is expected.
1517db96d56Sopenharmony_ci   It is similar to the parameter for :func:`compressobj`, but accepts
1527db96d56Sopenharmony_ci   more ranges of values:
1537db96d56Sopenharmony_ci
1547db96d56Sopenharmony_ci   * +8 to +15: The base-two logarithm of the window size.  The input
1557db96d56Sopenharmony_ci     must include a zlib header and trailer.
1567db96d56Sopenharmony_ci
1577db96d56Sopenharmony_ci   * 0: Automatically determine the window size from the zlib header.
1587db96d56Sopenharmony_ci     Only supported since zlib 1.2.3.5.
1597db96d56Sopenharmony_ci
1607db96d56Sopenharmony_ci   * −8 to −15: Uses the absolute value of *wbits* as the window size
1617db96d56Sopenharmony_ci     logarithm.  The input must be a raw stream with no header or trailer.
1627db96d56Sopenharmony_ci
1637db96d56Sopenharmony_ci   * +24 to +31 = 16 + (8 to 15): Uses the low 4 bits of the value as
1647db96d56Sopenharmony_ci     the window size logarithm.  The input must include a gzip header and
1657db96d56Sopenharmony_ci     trailer.
1667db96d56Sopenharmony_ci
1677db96d56Sopenharmony_ci   * +40 to +47 = 32 + (8 to 15): Uses the low 4 bits of the value as
1687db96d56Sopenharmony_ci     the window size logarithm, and automatically accepts either
1697db96d56Sopenharmony_ci     the zlib or gzip format.
1707db96d56Sopenharmony_ci
1717db96d56Sopenharmony_ci   When decompressing a stream, the window size must not be smaller
1727db96d56Sopenharmony_ci   than the size originally used to compress the stream; using a too-small
1737db96d56Sopenharmony_ci   value may result in an :exc:`error` exception. The default *wbits* value
1747db96d56Sopenharmony_ci   corresponds to the largest window size and requires a zlib header and
1757db96d56Sopenharmony_ci   trailer to be included.
1767db96d56Sopenharmony_ci
1777db96d56Sopenharmony_ci   *bufsize* is the initial size of the buffer used to hold decompressed data.  If
1787db96d56Sopenharmony_ci   more space is required, the buffer size will be increased as needed, so you
1797db96d56Sopenharmony_ci   don't have to get this value exactly right; tuning it will only save a few calls
1807db96d56Sopenharmony_ci   to :c:func:`malloc`.
1817db96d56Sopenharmony_ci
1827db96d56Sopenharmony_ci   .. versionchanged:: 3.6
1837db96d56Sopenharmony_ci      *wbits* and *bufsize* can be used as keyword arguments.
1847db96d56Sopenharmony_ci
1857db96d56Sopenharmony_ci.. function:: decompressobj(wbits=MAX_WBITS[, zdict])
1867db96d56Sopenharmony_ci
1877db96d56Sopenharmony_ci   Returns a decompression object, to be used for decompressing data streams that
1887db96d56Sopenharmony_ci   won't fit into memory at once.
1897db96d56Sopenharmony_ci
1907db96d56Sopenharmony_ci   The *wbits* parameter controls the size of the history buffer (or the
1917db96d56Sopenharmony_ci   "window size"), and what header and trailer format is expected.  It has
1927db96d56Sopenharmony_ci   the same meaning as `described for decompress() <#decompress-wbits>`__.
1937db96d56Sopenharmony_ci
1947db96d56Sopenharmony_ci   The *zdict* parameter specifies a predefined compression dictionary. If
1957db96d56Sopenharmony_ci   provided, this must be the same dictionary as was used by the compressor that
1967db96d56Sopenharmony_ci   produced the data that is to be decompressed.
1977db96d56Sopenharmony_ci
1987db96d56Sopenharmony_ci   .. note::
1997db96d56Sopenharmony_ci
2007db96d56Sopenharmony_ci      If *zdict* is a mutable object (such as a :class:`bytearray`), you must not
2017db96d56Sopenharmony_ci      modify its contents between the call to :func:`decompressobj` and the first
2027db96d56Sopenharmony_ci      call to the decompressor's ``decompress()`` method.
2037db96d56Sopenharmony_ci
2047db96d56Sopenharmony_ci   .. versionchanged:: 3.3
2057db96d56Sopenharmony_ci      Added the *zdict* parameter.
2067db96d56Sopenharmony_ci
2077db96d56Sopenharmony_ci
2087db96d56Sopenharmony_ciCompression objects support the following methods:
2097db96d56Sopenharmony_ci
2107db96d56Sopenharmony_ci
2117db96d56Sopenharmony_ci.. method:: Compress.compress(data)
2127db96d56Sopenharmony_ci
2137db96d56Sopenharmony_ci   Compress *data*, returning a bytes object containing compressed data for at least
2147db96d56Sopenharmony_ci   part of the data in *data*.  This data should be concatenated to the output
2157db96d56Sopenharmony_ci   produced by any preceding calls to the :meth:`compress` method.  Some input may
2167db96d56Sopenharmony_ci   be kept in internal buffers for later processing.
2177db96d56Sopenharmony_ci
2187db96d56Sopenharmony_ci
2197db96d56Sopenharmony_ci.. method:: Compress.flush([mode])
2207db96d56Sopenharmony_ci
2217db96d56Sopenharmony_ci   All pending input is processed, and a bytes object containing the remaining compressed
2227db96d56Sopenharmony_ci   output is returned.  *mode* can be selected from the constants
2237db96d56Sopenharmony_ci   :const:`Z_NO_FLUSH`, :const:`Z_PARTIAL_FLUSH`, :const:`Z_SYNC_FLUSH`,
2247db96d56Sopenharmony_ci   :const:`Z_FULL_FLUSH`, :const:`Z_BLOCK` (zlib 1.2.3.4), or :const:`Z_FINISH`,
2257db96d56Sopenharmony_ci   defaulting to :const:`Z_FINISH`.  Except :const:`Z_FINISH`, all constants
2267db96d56Sopenharmony_ci   allow compressing further bytestrings of data, while :const:`Z_FINISH` finishes the
2277db96d56Sopenharmony_ci   compressed stream and prevents compressing any more data.  After calling :meth:`flush`
2287db96d56Sopenharmony_ci   with *mode* set to :const:`Z_FINISH`, the :meth:`compress` method cannot be called again;
2297db96d56Sopenharmony_ci   the only realistic action is to delete the object.
2307db96d56Sopenharmony_ci
2317db96d56Sopenharmony_ci
2327db96d56Sopenharmony_ci.. method:: Compress.copy()
2337db96d56Sopenharmony_ci
2347db96d56Sopenharmony_ci   Returns a copy of the compression object.  This can be used to efficiently
2357db96d56Sopenharmony_ci   compress a set of data that share a common initial prefix.
2367db96d56Sopenharmony_ci
2377db96d56Sopenharmony_ci
2387db96d56Sopenharmony_ci.. versionchanged:: 3.8
2397db96d56Sopenharmony_ci   Added :func:`copy.copy` and :func:`copy.deepcopy` support to compression
2407db96d56Sopenharmony_ci   objects.
2417db96d56Sopenharmony_ci
2427db96d56Sopenharmony_ci
2437db96d56Sopenharmony_ciDecompression objects support the following methods and attributes:
2447db96d56Sopenharmony_ci
2457db96d56Sopenharmony_ci
2467db96d56Sopenharmony_ci.. attribute:: Decompress.unused_data
2477db96d56Sopenharmony_ci
2487db96d56Sopenharmony_ci   A bytes object which contains any bytes past the end of the compressed data. That is,
2497db96d56Sopenharmony_ci   this remains ``b""`` until the last byte that contains compression data is
2507db96d56Sopenharmony_ci   available.  If the whole bytestring turned out to contain compressed data, this is
2517db96d56Sopenharmony_ci   ``b""``, an empty bytes object.
2527db96d56Sopenharmony_ci
2537db96d56Sopenharmony_ci
2547db96d56Sopenharmony_ci.. attribute:: Decompress.unconsumed_tail
2557db96d56Sopenharmony_ci
2567db96d56Sopenharmony_ci   A bytes object that contains any data that was not consumed by the last
2577db96d56Sopenharmony_ci   :meth:`decompress` call because it exceeded the limit for the uncompressed data
2587db96d56Sopenharmony_ci   buffer.  This data has not yet been seen by the zlib machinery, so you must feed
2597db96d56Sopenharmony_ci   it (possibly with further data concatenated to it) back to a subsequent
2607db96d56Sopenharmony_ci   :meth:`decompress` method call in order to get correct output.
2617db96d56Sopenharmony_ci
2627db96d56Sopenharmony_ci
2637db96d56Sopenharmony_ci.. attribute:: Decompress.eof
2647db96d56Sopenharmony_ci
2657db96d56Sopenharmony_ci   A boolean indicating whether the end of the compressed data stream has been
2667db96d56Sopenharmony_ci   reached.
2677db96d56Sopenharmony_ci
2687db96d56Sopenharmony_ci   This makes it possible to distinguish between a properly formed compressed
2697db96d56Sopenharmony_ci   stream, and an incomplete or truncated one.
2707db96d56Sopenharmony_ci
2717db96d56Sopenharmony_ci   .. versionadded:: 3.3
2727db96d56Sopenharmony_ci
2737db96d56Sopenharmony_ci
2747db96d56Sopenharmony_ci.. method:: Decompress.decompress(data, max_length=0)
2757db96d56Sopenharmony_ci
2767db96d56Sopenharmony_ci   Decompress *data*, returning a bytes object containing the uncompressed data
2777db96d56Sopenharmony_ci   corresponding to at least part of the data in *string*.  This data should be
2787db96d56Sopenharmony_ci   concatenated to the output produced by any preceding calls to the
2797db96d56Sopenharmony_ci   :meth:`decompress` method.  Some of the input data may be preserved in internal
2807db96d56Sopenharmony_ci   buffers for later processing.
2817db96d56Sopenharmony_ci
2827db96d56Sopenharmony_ci   If the optional parameter *max_length* is non-zero then the return value will be
2837db96d56Sopenharmony_ci   no longer than *max_length*. This may mean that not all of the compressed input
2847db96d56Sopenharmony_ci   can be processed; and unconsumed data will be stored in the attribute
2857db96d56Sopenharmony_ci   :attr:`unconsumed_tail`. This bytestring must be passed to a subsequent call to
2867db96d56Sopenharmony_ci   :meth:`decompress` if decompression is to continue.  If *max_length* is zero
2877db96d56Sopenharmony_ci   then the whole input is decompressed, and :attr:`unconsumed_tail` is empty.
2887db96d56Sopenharmony_ci
2897db96d56Sopenharmony_ci   .. versionchanged:: 3.6
2907db96d56Sopenharmony_ci      *max_length* can be used as a keyword argument.
2917db96d56Sopenharmony_ci
2927db96d56Sopenharmony_ci
2937db96d56Sopenharmony_ci.. method:: Decompress.flush([length])
2947db96d56Sopenharmony_ci
2957db96d56Sopenharmony_ci   All pending input is processed, and a bytes object containing the remaining
2967db96d56Sopenharmony_ci   uncompressed output is returned.  After calling :meth:`flush`, the
2977db96d56Sopenharmony_ci   :meth:`decompress` method cannot be called again; the only realistic action is
2987db96d56Sopenharmony_ci   to delete the object.
2997db96d56Sopenharmony_ci
3007db96d56Sopenharmony_ci   The optional parameter *length* sets the initial size of the output buffer.
3017db96d56Sopenharmony_ci
3027db96d56Sopenharmony_ci
3037db96d56Sopenharmony_ci.. method:: Decompress.copy()
3047db96d56Sopenharmony_ci
3057db96d56Sopenharmony_ci   Returns a copy of the decompression object.  This can be used to save the state
3067db96d56Sopenharmony_ci   of the decompressor midway through the data stream in order to speed up random
3077db96d56Sopenharmony_ci   seeks into the stream at a future point.
3087db96d56Sopenharmony_ci
3097db96d56Sopenharmony_ci
3107db96d56Sopenharmony_ci.. versionchanged:: 3.8
3117db96d56Sopenharmony_ci   Added :func:`copy.copy` and :func:`copy.deepcopy` support to decompression
3127db96d56Sopenharmony_ci   objects.
3137db96d56Sopenharmony_ci
3147db96d56Sopenharmony_ci
3157db96d56Sopenharmony_ciInformation about the version of the zlib library in use is available through
3167db96d56Sopenharmony_cithe following constants:
3177db96d56Sopenharmony_ci
3187db96d56Sopenharmony_ci
3197db96d56Sopenharmony_ci.. data:: ZLIB_VERSION
3207db96d56Sopenharmony_ci
3217db96d56Sopenharmony_ci   The version string of the zlib library that was used for building the module.
3227db96d56Sopenharmony_ci   This may be different from the zlib library actually used at runtime, which
3237db96d56Sopenharmony_ci   is available as :const:`ZLIB_RUNTIME_VERSION`.
3247db96d56Sopenharmony_ci
3257db96d56Sopenharmony_ci
3267db96d56Sopenharmony_ci.. data:: ZLIB_RUNTIME_VERSION
3277db96d56Sopenharmony_ci
3287db96d56Sopenharmony_ci   The version string of the zlib library actually loaded by the interpreter.
3297db96d56Sopenharmony_ci
3307db96d56Sopenharmony_ci   .. versionadded:: 3.3
3317db96d56Sopenharmony_ci
3327db96d56Sopenharmony_ci
3337db96d56Sopenharmony_ci.. seealso::
3347db96d56Sopenharmony_ci
3357db96d56Sopenharmony_ci   Module :mod:`gzip`
3367db96d56Sopenharmony_ci      Reading and writing :program:`gzip`\ -format files.
3377db96d56Sopenharmony_ci
3387db96d56Sopenharmony_ci   http://www.zlib.net
3397db96d56Sopenharmony_ci      The zlib library home page.
3407db96d56Sopenharmony_ci
3417db96d56Sopenharmony_ci   http://www.zlib.net/manual.html
3427db96d56Sopenharmony_ci      The zlib manual explains  the semantics and usage of the library's many
3437db96d56Sopenharmony_ci      functions.
344