Project

General

Profile

Bug #3267 ยป 0001-dsynth-add-zstd-support.patch

piecuch, 03/27/2021 04:09 AM

View differences:

usr.bin/dsynth/build.c
tot += st.st_size * 3;
else if (strcmp(ptr, ".txz") == 0)
tot += st.st_size * 5;
else if (strcmp(ptr, ".tzst") == 0)
tot += st.st_size * 5;
else if (strcmp(ptr, ".tbz") == 0)
tot += st.st_size * 3;
else
usr.bin/dsynth/config.c
dassert(strcmp(l2, ".tgz") == 0 ||
strcmp(l2, ".tar") == 0 ||
strcmp(l2, ".txz") == 0 ||
strcmp(l2, ".tzst") == 0 ||
strcmp(l2, ".tbz") == 0,
"Config: Unknown Package_suffix,"
"specify .tgz .tar .txz or .tbz");
"specify .tgz .tar .txz .tbz or .tzst");
} else if (strcmp(l1, "Number_of_builders") == 0) {
MaxWorkers = strtol(l2, NULL, 0);
if (MaxWorkers == 0)
usr.bin/dsynth/dsynth.1
.It Pa .tgz
.It Pa .tar
.It Pa .tbz
.It Pa .tzst
The recommended setting for
.Va Package_suffix
is either
usr.bin/dsynth/dsynth.h
#define DISABLED_STR "disabled"
/*
* This can be ".tar", ".tgz", ".txz", or ".tbz".
* This can be ".tar", ".tgz", ".txz", ".tbz", "tzst".
*
* .tar - very fast but you'll need 1TB+ of storage just for the package files.
* .txz - very compact but decompression speed is horrible.
* .tgz - reasonable compression, extremely fast decompression. Roughly
* 1.1x to 2.0x the size of a .txz, but decompresses 10x faster.
* .tbz - worse than .tgz generally
* .tzst - slightly worse compression ratio to .txz, decompresses 13x faster.
*
* NOTE: Decompression speed does effect bulk builds since each slot has
* to install pre-reqs before building any particular package. Set
usr.bin/dsynth/repo.c
} else if (strcmp(UsePkgSufx, ".tbz") == 0) {
decomp = "unxz";
comp = "bzip";
} else if (strcmp(UsePkgSufx, ".tzst") == 0) {
decomp = "unxz";
comp = "zstd";
} else {
dfatal("recompressing as %s not supported",
UsePkgSufx);
......
} else if (strcmp(UsePkgSufx, ".tbz") == 0) {
decomp = "bunzip2";
comp = "xz";
} else if (strcmp(UsePkgSufx, ".tzst") == 0) {
decomp = "unzstd";
comp = "xz";
} else {
dfatal("recompressing from %s not supported",
UsePkgSufx);
    (1-1/1)