From f1041bb38b399060822f078cf5c5fae2abd13275 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 4 Feb 2025 10:57:10 +0000 Subject: [PATCH] compress: Enable long mode (if available) Signed-off-by: Michael Tremer --- src/pakfire/compress.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pakfire/compress.c b/src/pakfire/compress.c index 99fa8ece..f7b4e447 100644 --- a/src/pakfire/compress.c +++ b/src/pakfire/compress.c @@ -980,6 +980,16 @@ int pakfire_compress_create_archive(struct pakfire* pakfire, struct archive** ar } } +#if ARCHIVE_VERSION_NUMBER >= 3007002 + // Enable long mode (supported from libarchive >= 3.7.2) + r = archive_write_set_filter_option(a, NULL, "long", "31"); + if (r) { + ERROR(ctx, "Failed to enable Zstandard long mode: %s\n", + archive_error_string(a)); + goto ERROR; + } +#endif /* ARCHIVE_VERSION_NUMBER >= 3007002 */ + #if ARCHIVE_VERSION_NUMBER >= 3006000 // Fetch numbers of processors long processors = sysconf(_SC_NPROCESSORS_ONLN); -- 2.39.5