Function qt_core::q_uncompress_1a

source ·
pub unsafe fn q_uncompress_1a(
    data: impl CastInto<Ref<QByteArray>>
) -> CppBox<QByteArray>
Expand description

Uncompresses the data byte array and returns a new byte array with the uncompressed data.

Calls C++ function: QByteArray qUncompress(const QByteArray& data).

C++ documentation:

Uncompresses the data byte array and returns a new byte array with the uncompressed data.

Returns an empty QByteArray if the input data was corrupt.

This function will uncompress data compressed with qCompress() from this and any earlier Qt version, back to Qt 3.1 when this feature was added.

Note: If you want to use this function to uncompress external data that was compressed using zlib, you first need to prepend a four byte header to the byte array containing the data. The header must contain the expected length (in bytes) of the uncompressed data, expressed as an unsigned, big-endian, 32-bit integer.

See also qCompress().