forked from crc-org/crc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing[1] suggests that zstd compression might be better than xz, with decompression being much faster than xz, so it's worth considering it for our bundles. There is no native support for zstd in golang, so this makes use of https://pkg.go.dev/github.com/klauspost/compress/zstd for handling this format. An alternative would be https://github.com/DataDog/zstd which provides performance numbers, but which is not a pure go implementation, which is why I picked the other one. github.com/h2non/filetype does not support zstd type detection, so a bit of additional code had to be added for that. Before registering a zstd type, we check if it's supported, this will avoid potential issues after h2non/filetype#98 is merged. When compressed with `zstd --ultra -22 -T0`, the 4.6.9 bundle is 2.2G in size, and uncompresses in about 1 minute. The xz-compressed bundle is 2.6G in size, and takes 3 minutes to uncompress. An existing bundle can be converted to zstd for testing purposes with: xzcat $bundle |zstd - -o crc_libvirt_xxx.crcbundle This fixes crc-org#1340 for now.
- Loading branch information
Showing
74 changed files
with
17,844 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ var ( | |
"test.tar.gz", | ||
"test.zip", | ||
"test.tar.xz", | ||
"test.tar.zst", | ||
} | ||
) | ||
|
||
|
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.