fs/erofs: add DEFLATE algorithm support
PATCH 1/1 fs/erofs: add DEFLATE algorithm support
This patch adds DEFLATE compression algorithm support. It's a good choice to trade off between compression ratios and performance compared to LZ4. Alternatively, DEFLATE could be used for some specific files since EROFS supports multiple compression algorithms in one image.
--- fs/erofs/Kconfig | 15 ++++++++ fs/erofs/decompress.c | 83 +++++++++++++++++++++++++++++++++++++++++++ fs/erofs/erofs_fs.h | 1 + 3 files changed, 99 insertions(+)
fs/erofs/Kconfig +15 -0
@@ -19,3 +19,18 @@ config FS_EROFS_ZIP help Enable fixed-sized output compression for EROFS. If you don't want to enable compression feature, say N. + +config FS_EROFS_ZIP_DEFLATE + bool "EROFS DEFLATE compressed data support" + depends on FS_EROFS_ZIP + select ZLIB + help + Saying Y here includes support for reading EROFS file systems + containing DEFLATE compressed data. It gives better compression + ratios than the default LZ4 format, while it costs more CPU + overhead. + + DEFLATE support is an experimental feature for now and so most + file systems will be readable without selecting this option. + + If unsure, say N.
fs/erofs/decompress.c +83 -0
95 lines not on this page · raw message
fs/erofs/erofs_fs.h +1 -0
@@ -304,6 +304,7 @@ enum {enum {Z_EROFS_COMPRESSION_LZ4 =0 ,Z_EROFS_COMPRESSION_LZMA =1 , +Z_EROFS_COMPRESSION_DEFLATE =2 ,Z_EROFS_COMPRESSION_MAX };
Signature · 1 line
2.34.1
Hi Jianan,
Quoted 6 lines · Jianan Huang
This patch adds DEFLATE compression algorithm support. It's a good choice to trade off between compression ratios and performance compared to LZ4. Alternatively, DEFLATE could be used for some specific files since EROFS supports multiple compression algorithms in one image.
Signed-off-by Jianan Huang <[email protected]>
Thanks,
Gao Xiang
Quoted 6 lines · Jianan Huang
This patch adds DEFLATE compression algorithm support. It's a good choice to trade off between compression ratios and performance compared to LZ4. Alternatively, DEFLATE could be used for some specific files since EROFS supports multiple compression algorithms in one image.
Applied to u-boot/master, thanks!
Signature · 1 line
Tom