pub unsafe fn q_compress_q_byte_array_int(
    data: impl CastInto<Ref<QByteArray>>,
    compression_level: c_int
) -> CppBox<QByteArray>
Expand description

Compresses the data byte array and returns the compressed data in a new byte array.

Calls C++ function: QByteArray qCompress(const QByteArray& data, int compressionLevel = …).

C++ documentation:

Compresses the data byte array and returns the compressed data in a new byte array.

The compressionLevel parameter specifies how much compression should be used. Valid values are between 0 and 9, with 9 corresponding to the greatest compression (i.e. smaller compressed data) at the cost of using a slower algorithm. Smaller values (8, 7, ..., 1) provide successively less compression at slightly faster speeds. The value 0 corresponds to no compression at all. The default value is -1, which specifies zlib's default compression.

See also qUncompress().