You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Z_FULL_FLUSH must not be used as it clears compression dictionary, this ruins compression. Use Z_SYNC_FLUSH instead.
The diff below fixed these issues.
diff --git a/sched/db_purge.cpp b/sched/db_purge.cpp--- a/sched/db_purge.cpp+++ b/sched/db_purge.cpp@@ -504,7 +508,7 @@ int archive_result_gz (DB_RESULT& result) {
fail("ERROR: writing result archive failed\n");
}
- n = gzflush((gzFile)re_stream, Z_FULL_FLUSH);+ n = gzflush((gzFile)re_stream, Z_SYNC_FLUSH);
if (n != Z_OK) {
fail("ERROR: writing result archive failed (flush)\n");
}
@@ -538,7 +542,7 @@ int archive_wu_gz (DB_WORKUNIT& wu) {
fail("ERROR: writing workunit archive failed\n");
}
- n = gzflush((gzFile)re_stream,Z_FULL_FLUSH);+ n = gzflush((gzFile)wu_stream,Z_SYNC_FLUSH);
if (n != Z_OK) {
fail("ERROR: writing workunit archive failed (flush)\n");
}
@@ -551,7 +555,7 @@ int archive_wu_gz (DB_WORKUNIT& wu) {
fail("ERROR: writing workunit index failed\n");
}
- n = gzflush((gzFile)re_stream,Z_SYNC_FLUSH);+ n = gzflush((gzFile)wu_index_stream,Z_SYNC_FLUSH);
if (n != Z_OK) {
fail("ERROR: writing workunit index failed (flush)\n");
}
The text was updated successfully, but these errors were encountered:
There are two bugs in db_purge zlib support code:
1. Wrong archive streams flushed (copy-paste programming...)
2. `Z_FULL_FLUSH` must not be used as it clears compression dictionary, this ruins compression. Use `Z_SYNC_FLUSH` instead.
This fixesBOINC#3145
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
There are two bugs in db_purge zlib support code:
Z_FULL_FLUSH
must not be used as it clears compression dictionary, this ruins compression. UseZ_SYNC_FLUSH
instead.The diff below fixed these issues.
The text was updated successfully, but these errors were encountered: