squashfs: Add lz4 hc compression
PATCH 1/1 squashfs: Add lz4 hc compression
lz4 offers a high compression mode. A minimalistic file system shrinks by about 15%.
--- fs/squashfs/Config.in | 3 +++ fs/squashfs/squashfs.mk | 4 ++++ 2 files changed, 7 insertions(+)
fs/squashfs/Config.in +3 -0
@@ -18,6 +18,9 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4 bool "lz4" +config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4_HC + bool "lz4hc" + config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA bool "lzma"
fs/squashfs/squashfs.mk +4 -0
@@ -9,6 +9,9 @@ ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4),y) ROOTFS_SQUASHFS_ARGS += -comp lz4 else +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4_HC),y) +ROOTFS_SQUASHFS_ARGS += -comp lz4 -Xhc +else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y) ROOTFS_SQUASHFS_ARGS += -comp lzo else
@@ -23,6 +26,7 @@ endif endif endif endif +endif define ROOTFS_SQUASHFS_CMD $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \
Signature · 1 line
2.1.4
PATCH 1/1 squashfs: Add lz4 hc compression
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Matthias" == Matthias Weisser <[email protected]> writes:
Hi,
Sorry for the slow response.
Quoted 12 lines
lz4 offers a high compression mode. A minimalistic file system shrinks by about 15%.
Signed-off-by Matthias Weisser <[email protected]>--- fs/squashfs/Config.in | 3 +++ fs/squashfs/squashfs.mk | 4 ++++ 2 files changed, 7 insertions(+)fs/squashfs/Config.in +0
-0
fs/squashfs/Config.in config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP · line 22
Quoted 5 lines
fs/squashfs/Config.in +2
-0@@ -18,6 +18,9 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4 bool "lz4" +config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4_HC + bool "lz4hc"
Is there ever any use case for enabling lz4 WITHOUT the high compression option? The only drawback is somewhat slower filesystem creation, right? Perhaps we can just adjust the existing lz4 option to use -Xhc?
Quoted 33 lines
fs/squashfs/Config.in +1
-0+ config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA bool "lzma"fs/squashfs/squashfs.mk +4
-0@@ -9,6 +9,9 @@ ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4),y) ROOTFS_SQUASHFS_ARGS += -comp lz4 else +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4_HC),y) +ROOTFS_SQUASHFS_ARGS += -comp lz4 -Xhc +else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y) ROOTFS_SQUASHFS_ARGS += -comp lzo else@@ -23,6 +26,7 @@ endif endif endif endif +endif define ROOTFS_SQUASHFS_CMD $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 squashfs: Add lz4 hc compression
Hi Peter
2015-10-03 14:34 GMT+02:00 Peter Korsgaard <[email protected]>:
Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Matthias" == Matthias Weisser <[email protected]> writes:
Hi,
Sorry for the slow response.
Quoted 14 lines
lz4 offers a high compression mode. A minimalistic file system shrinks by about 15%.
Signed-off-by Matthias Weisser <[email protected]>--- fs/squashfs/Config.in | 3 +++ fs/squashfs/squashfs.mk | 4 ++++ 2 files changed, 7 insertions(+)fs/squashfs/Config.in +0
-0@@ -18,6 +18,9 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4 bool "lz4"
Quoted 6 lines
fs/squashfs/Config.in config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP · line 22
Quoted 2 lines
fs/squashfs/Config.in +2
-0+config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4_HC + bool "lz4hc"Is there ever any use case for enabling lz4 WITHOUT the high compression option? The only drawback is somewhat slower filesystem creation, right? Perhaps we can just adjust the existing lz4 option to use -Xhc?
I also thought about that. But didn't want to change anything existing. From my point of view there is no reason not to use the high compression mode. Actually the Linux kernel does exactly this when LZ4 compression is activated. The compression speed is still in the range of zlib compression and therefore not that slow.
Should I send a new patch?
Regards
Matthias
Quoted 40 lines
Quoted 32 lines
fs/squashfs/Config.in +1
-0+ config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA bool "lzma"fs/squashfs/squashfs.mk +4
-1@@ -9,6 +9,9 @@ ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4),y) ROOTFS_SQUASHFS_ARGS += -comp lz4 else +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4_HC),y) +ROOTFS_SQUASHFS_ARGS += -comp lz4 -Xhc +else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y) ROOTFS_SQUASHFS_ARGS += -comp lzo else@@ -23,6 +26,7 @@ endif endif endif endif +endif define ROOTFS_SQUASHFS_CMD $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \ --2.1.4
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
Bye, Peter Korsgaard
PATCH 1/1 squashfs: Add lz4 hc compression
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Matthias" == Matthias Wei?er <[email protected]> writes:
Hi,
Quoted 9 lines
Quoted 3 lines
Is there ever any use case for enabling lz4 WITHOUT the high compression option? The only drawback is somewhat slower filesystem creation, right? Perhaps we can just adjust the existing lz4 option to use -Xhc?
I also thought about that. But didn't want to change anything existing.
Quoted 1 line
From my point of view there is no reason not to use the high
compression mode. Actually the Linux kernel does exactly this when LZ4 compression is activated. The compression speed is still in the range of zlib compression and therefore not that slow.
Indeed. Ok, then I think we should just adjust the existing lz4 option to use the hc mode.
Committed with that fixed, thanks!
Signature · 2 lines
Venlig hilsen, Peter Korsgaard