Although it would be nice to only use one compression algorithm, the
challenges to use Zstandard are a little bit too large. The compression
is actually not better (if even) and takes up a lot more resources. At
the same time, there is very little support for Zstandard in browsers
and Python itself, which results us writing a lot of extra code to
ensure that the files are often decoded again to be delivered in
plaintext and being DEFLATEd again by the reverse proxies.
So it all makes a lot more sense to use gzip from the start and just be
done with it.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
}
}
+#if 0
// Pass everything on to syslog
pakfire_log_syslog(NULL, priority, file, line, fn, format, args);
+#endif
}
static int pakfire_job_child(struct pakfire_job* job) {
// If we want to write the log file compressed, we replace the file handle
if (self->flags & PAKFIRE_LOG_FILE_COMPRESS) {
- self->f = pakfire_zstdfopen(self->f, "w");
+ self->f = pakfire_gzfopen(self->f, "w");
if (!self->f) {
ERROR(self->ctx, "Could not enable compression for log file: %m\n");
r = -errno;
}
// Add a suffix to the filename
- r = pakfire_string_append(self->filename, ".zst");
+ r = pakfire_string_append(self->filename, ".gz");
if (r < 0)
goto ERROR;
}