# sphobjinv.zlib

zlib (de)compression helpers for `sphobjinv`.

`sphobjinv` is a toolkit for manipulation and inspection of Sphinx objects.inv files.

Author

  Brian Skinn (brian.skinn@gmail.com)

File Created

  5 Nov 2017

Copyright

  (c) 2016-2026 Brian Skinn and community contributors

Source Repository

  https://github.com/bskinn/sphobjinv

Documentation

  https://sphobjinv.readthedocs.io/en/stable

License

  Code: MIT License

  Docs & Docstrings: CC BY 4.0 International License

  See LICENSE.txt for full license terms.

Members

compress(bstr)

  Compress a version 2 `intersphinx` objects.inv bytestring.

  The #-prefixed comment lines are left unchanged, whereas the plaintext data lines are compressed with `zlib`.

  Parameters:

    bstr – `bytes` – Binary string containing the decompressed contents of an objects.inv file.

  Returns:

    out_b – `bytes` – Binary string containing the compressed objects.inv content.

decompress(bstr)

  Decompress a version 2 `intersphinx` objects.inv bytestring.

  The #-prefixed comment lines are left unchanged, whereas the `zlib`-compressed data lines are decompressed to plaintext.

  Parameters:

    bstr – `bytes` – Binary string containing a compressed objects.inv file.

  Returns:

    out_b – `bytes` – Decompressed binary string containing the plaintext objects.inv content.