diff options
author | Rosen Penev <rosenp@gmail.com> | 2023-01-07 00:18:34 -0800 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-01-17 21:40:18 +0100 |
commit | 11ad0c83554954a7f820238cd94d51a124581fc7 (patch) | |
tree | 00012467450064833f7ecc65ef387314c2d0799b /include | |
parent | 62e150949fc01ae2327207fa98fae9c5cff6035c (diff) | |
download | upstream-11ad0c83554954a7f820238cd94d51a124581fc7.tar.gz upstream-11ad0c83554954a7f820238cd94d51a124581fc7.tar.bz2 upstream-11ad0c83554954a7f820238cd94d51a124581fc7.zip |
include: use libdeflate's gzip to decompress
libdeflate decompresses much faster than gzip.
Example:
~/d/openwrt> time gzip -dc dl/cmake-3.25.1.tar.gz > /dev/null
________________________________________________________
Executed in 1.01 secs fish external
usr time 912.61 millis 1.67 millis 910.94 millis
sys time 32.21 millis 0.25 millis 31.96 millis
~/d/openwrt> time libdeflate-gzip -dc dl/cmake-3.25.1.tar.gz > /dev/null
________________________________________________________
Executed in 523.04 millis fish external
usr time 415.48 millis 1.07 millis 414.41 millis
sys time 107.74 millis 0.15 millis 107.59 millis
~/d/openwrt> time gzip -dc dl/tessdata-4.1.0.tar.gz > /dev/null
________________________________________________________
Executed in 8.99 secs fish external
usr time 8.90 secs 530.00 micros 8.90 secs
sys time 0.07 secs 63.00 micros 0.07 secs
~/d/openwrt> time libdeflate-gzip -dc dl/tessdata-4.1.0.tar.gz > /dev/null
________________________________________________________
Executed in 2.74 secs fish external
usr time 2.38 secs 537.00 micros 2.38 secs
sys time 0.35 secs 66.00 micros 0.35 secs
Place libdeflate into tools-core as it is needed to decompress other
archives.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/kernel-defaults.mk | 2 | ||||
-rw-r--r-- | include/unpack.mk | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 127fa8563a..37c1141139 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -21,7 +21,7 @@ Kernel/Patch:=$(Kernel/Patch/Default) ifneq (,$(findstring .xz,$(LINUX_SOURCE))) LINUX_CAT:=xzcat else - LINUX_CAT:=gzip -dc + LINUX_CAT:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc endif ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") diff --git a/include/unpack.mk b/include/unpack.mk index ebece69978..5959d55f4b 100644 --- a/include/unpack.mk +++ b/include/unpack.mk @@ -18,7 +18,7 @@ ifeq ($(strip $(UNPACK_CMD)),) ifeq ($(filter gz tgz,$(EXT)),$(EXT)) EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) - DECOMPRESS_CMD:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | + DECOMPRESS_CMD:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) | endif ifeq ($(filter bzip2 bz2 bz tbz2 tbz,$(EXT)),$(EXT)) EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) @@ -56,7 +56,7 @@ ifeq ($(strip $(UNPACK_CMD)),) endif # replace zcat with $(ZCAT), because some system don't support it properly ifeq ($(PKG_CAT),zcat) - UNPACK_CMD=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD) + UNPACK_CMD=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD) endif endif endif |