I think It would be awesome if PySide2 provides bindings to:
| QByteArray | qCompress(const QByteArray & data, int compressionLevel = -1) | 
| QByteArray | qCompress(const uchar * data, int nbytes, int compressionLevel = -1) | 
| QByteArray | qUncompress(const QByteArray & data) | 
| QByteArray | qUncompress(const uchar * data, int nbytes) | 
These methods are available on PyQt5, and they provide an easy way to perform low-level IO operations from Python.