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) Brian Skinn 2016-2022

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

bstrbytes – Binary string containing the decompressed contents of an objects.inv file.

Returns

out_bbytes – 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

bstrbytes – Binary string containing a compressed objects.inv file.

Returns

out_bbytes – Decompressed binary string containing the plaintext objects.inv content.