From d4bd6b2c664494d08e28f9d8768aead241ad1cff Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 23 Mar 2021 20:16:02 +0000 Subject: [PATCH] snapshots: Compress them as fast as possible Signed-off-by: Michael Tremer --- src/libpakfire/snapshot.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libpakfire/snapshot.c b/src/libpakfire/snapshot.c index 0d5304385..7a82daa12 100644 --- a/src/libpakfire/snapshot.c +++ b/src/libpakfire/snapshot.c @@ -74,6 +74,14 @@ static struct archive* pakfire_snapshot_create_archive(Pakfire pakfire, FILE* f) goto ERROR; } + // Set compression level to fastest + r = archive_write_set_filter_option(a, NULL, "compression-level", "1"); + if (r) { + ERROR(pakfire, "Could not set Zstandard compression level: %s\n", + archive_error_string(a)); + goto ERROR; + } + // Write archive to file r = archive_write_open_FILE(a, f); if (r) -- 2.47.2