From: Michael Tremer Date: Fri, 7 Feb 2025 23:03:30 +0000 (+0000) Subject: compress: Add the option to make gzipped archives X-Git-Tag: 0.9.30~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d62aeaecb36bb178a35d882cc43acd2a5d9ab33;p=pakfire.git compress: Add the option to make gzipped archives Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/compress.c b/src/pakfire/compress.c index 245b0aea..f51134a9 100644 --- a/src/pakfire/compress.c +++ b/src/pakfire/compress.c @@ -1001,6 +1001,17 @@ int pakfire_compress_create_archive(struct pakfire* pakfire, struct archive** ar } } #endif + break; + + case PAKFIRE_COMPRESS_GZIP: + // Enable gzip + r = archive_write_add_filter_gzip(a); + if (r) { + ERROR(ctx, "Could not enable gzip compression: %s\n", + archive_error_string(a)); + goto ERROR; + } + break; } // Write archive to f diff --git a/src/pakfire/compress.h b/src/pakfire/compress.h index d12d86bd..60a0839c 100644 --- a/src/pakfire/compress.h +++ b/src/pakfire/compress.h @@ -43,6 +43,7 @@ FILE* pakfire_zstdfopen(FILE* f, const char* mode); // Algorithms enum pakfire_compressions { PAKFIRE_COMPRESS_ZSTD, + PAKFIRE_COMPRESS_GZIP, }; // Compress