Bug #3267 ยป 0001-dsynth-add-zstd-support.patch
usr.bin/dsynth/build.c | ||
---|---|---|
1792 | 1792 |
tot += st.st_size * 3; |
1793 | 1793 |
else if (strcmp(ptr, ".txz") == 0) |
1794 | 1794 |
tot += st.st_size * 5; |
1795 |
else if (strcmp(ptr, ".tzst") == 0) |
|
1796 |
tot += st.st_size * 5; |
|
1795 | 1797 |
else if (strcmp(ptr, ".tbz") == 0) |
1796 | 1798 |
tot += st.st_size * 3; |
1797 | 1799 |
else |
usr.bin/dsynth/config.c | ||
---|---|---|
451 | 451 |
dassert(strcmp(l2, ".tgz") == 0 || |
452 | 452 |
strcmp(l2, ".tar") == 0 || |
453 | 453 |
strcmp(l2, ".txz") == 0 || |
454 |
strcmp(l2, ".tzst") == 0 || |
|
454 | 455 |
strcmp(l2, ".tbz") == 0, |
455 | 456 |
"Config: Unknown Package_suffix," |
456 |
"specify .tgz .tar .txz or .tbz");
|
|
457 |
"specify .tgz .tar .txz .tbz or .tzst");
|
|
457 | 458 |
} else if (strcmp(l1, "Number_of_builders") == 0) { |
458 | 459 |
MaxWorkers = strtol(l2, NULL, 0); |
459 | 460 |
if (MaxWorkers == 0) |
usr.bin/dsynth/dsynth.1 | ||
---|---|---|
402 | 402 |
.It Pa .tgz |
403 | 403 |
.It Pa .tar |
404 | 404 |
.It Pa .tbz |
405 |
.It Pa .tzst |
|
405 | 406 |
The recommended setting for |
406 | 407 |
.Va Package_suffix |
407 | 408 |
is either |
usr.bin/dsynth/dsynth.h | ||
---|---|---|
93 | 93 |
#define DISABLED_STR "disabled" |
94 | 94 | |
95 | 95 |
/* |
96 |
* This can be ".tar", ".tgz", ".txz", or ".tbz".
|
|
96 |
* This can be ".tar", ".tgz", ".txz", ".tbz", "tzst".
|
|
97 | 97 |
* |
98 | 98 |
* .tar - very fast but you'll need 1TB+ of storage just for the package files. |
99 | 99 |
* .txz - very compact but decompression speed is horrible. |
100 | 100 |
* .tgz - reasonable compression, extremely fast decompression. Roughly |
101 | 101 |
* 1.1x to 2.0x the size of a .txz, but decompresses 10x faster. |
102 | 102 |
* .tbz - worse than .tgz generally |
103 |
* .tzst - slightly worse compression ratio to .txz, decompresses 13x faster. |
|
103 | 104 |
* |
104 | 105 |
* NOTE: Decompression speed does effect bulk builds since each slot has |
105 | 106 |
* to install pre-reqs before building any particular package. Set |
usr.bin/dsynth/repo.c | ||
---|---|---|
194 | 194 |
} else if (strcmp(UsePkgSufx, ".tbz") == 0) { |
195 | 195 |
decomp = "unxz"; |
196 | 196 |
comp = "bzip"; |
197 |
} else if (strcmp(UsePkgSufx, ".tzst") == 0) { |
|
198 |
decomp = "unxz"; |
|
199 |
comp = "zstd"; |
|
197 | 200 |
} else { |
198 | 201 |
dfatal("recompressing as %s not supported", |
199 | 202 |
UsePkgSufx); |
... | ... | |
221 | 224 |
} else if (strcmp(UsePkgSufx, ".tbz") == 0) { |
222 | 225 |
decomp = "bunzip2"; |
223 | 226 |
comp = "xz"; |
227 |
} else if (strcmp(UsePkgSufx, ".tzst") == 0) { |
|
228 |
decomp = "unzstd"; |
|
229 |
comp = "xz"; |
|
224 | 230 |
} else { |
225 | 231 |
dfatal("recompressing from %s not supported", |
226 | 232 |
UsePkgSufx); |