Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
tzst: by default compression at the 19 level
Baptiste Daroussin committed 5 years ago
commit 31000cb40b30d0e069ef98db5f98cad6c6390380
parent 848266c
3 files changed +8 -2
modified libpkg/packing.c
@@ -356,6 +356,8 @@ packing_set_format(struct archive *a, pkg_formats format, int clevel)
#ifdef HAVE_ARCHIVE_WRITE_ADD_FILTER_ZSTD
		if (archive_write_add_filter_zstd(a) == ARCHIVE_OK) {
			elected_format = TZS;
+
			if (clevel == -1)
+
				clevel = 19;
			goto out;
		}
#endif
@@ -389,6 +391,8 @@ packing_set_format(struct archive *a, pkg_formats format, int clevel)
	default:
		return (NULL);
	}
+
	if (clevel == -1)
+
		clevel = 0;

out:
	/*
modified libpkg/pkg_create.c
@@ -241,6 +241,7 @@ pkg_create_new(void)

	pc = xcalloc(1, sizeof(*pc));
	pc->format = DEFAULT_COMPRESSION;
+
	pc->compression_level = -1;
	pc->timestamp = (time_t) -1;
	pc->overwrite = true;
	pc->expand_manifest = false;
modified src/create.c
@@ -184,8 +184,9 @@ exec_create(int argc, char **argv)
	bool		 expand_manifest = false;
	time_t		 ts = (time_t)-1;

-
	/* Sentinel values: INT_MIN (fast), 0 (default), INT_MAX (best). */
-
	level = 0;
+
	/* Sentinel values: INT_MIN (fast), -1 (default per pkg),
+
	 * 0 (default per libarchive), INT_MAX (best). */
+
	level = -1;

	/* POLA: pkg create is quiet by default, unless
	 * PKG_CREATE_VERBOSE is set in pkg.conf.  This is for