]> git.ipfire.org Git - pakfire.git/commitdiff
snapshots: Compress them as fast as possible
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Mar 2021 20:16:02 +0000 (20:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Mar 2021 20:16:02 +0000 (20:16 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/snapshot.c

index 0d5304385dc57e5b2963d7095acac641afb97575..7a82daa125a9a5d188513b484bddfda17bf1631a 100644 (file)
@@ -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)