mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Revise Utils::Gzip::compress code
Change signature Add ZLIB_CONST define to make z_stream.next_in const Cast to zlib defined type Bytef* Set memLevel to 9 in deflateInit2() for maximum performance Revise compression loop On returning false, free memory correctly by calling deflateEnd() Reserve space by the estimation of deflateBound()
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Utils
|
||||
{
|
||||
namespace Gzip
|
||||
{
|
||||
bool compress(QByteArray src, QByteArray &dest);
|
||||
QByteArray compress(const QByteArray &data, int level = 6, bool *ok = nullptr);
|
||||
bool uncompress(QByteArray src, QByteArray &dest);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user