Revise Utils::Gzip::decompress

Rename from uncompress to decompress
Change signature
Use proper casting
Use larger buffer for the output of inflate()
Reserve 1 MBytes for output buffer
Change function signature
This commit is contained in:
Chocobo1 2017-04-17 17:37:37 +08:00
parent 302c8ba850
commit 617f19e599
4 changed files with 44 additions and 40 deletions

View file

@ -92,8 +92,8 @@ void DownloadHandler::processFinishedDownload()
// Success
QByteArray replyData = m_reply->readAll();
if (m_reply->rawHeader("Content-Encoding") == "gzip") {
// uncompress gzip reply
Utils::Gzip::uncompress(replyData, replyData);
// decompress gzip reply
replyData = Utils::Gzip::decompress(replyData);
}
if (m_saveToFile) {