@@ -58,6 +58,8 @@ INSTALL(FILES libubi/libubi-tiny.h libubi/libubi.h libubi/ubi-media.h
IF(DEFINED CMAKE_OVL_MOUNT_COMPRESS_ZLIB)
ADD_DEFINITIONS(-DOVL_MOUNT_COMPRESS_ZLIB)
+ELSEIF(DEFINED CMAKE_OVL_MOUNT_COMPRESS_ZSTD)
+ ADD_DEFINITIONS(-DOVL_MOUNT_COMPRESS_ZSTD)
ENDIF(DEFINED CMAKE_OVL_MOUNT_COMPRESS_ZLIB)
IF(DEFINED CMAKE_OVL_MOUNT_FULL_ACCESS_TIME)
@@ -355,6 +355,8 @@ static int overlay_mount_fs(struct volume *v)
#endif
#ifdef OVL_MOUNT_COMPRESS_ZLIB
"compr=zlib"
+#elif OVL_MOUNT_COMPRESS_ZSTD
+ "compr=zstd"
#else
NULL
#endif
While forced zlib compression is already supported, zstd is much faster at the same compression ratios. Prepare fstools to mount the overlay with forced zstd compression, This is already supported in ubifs, while there's a pending patch for jffs2 [1]. [1] https://lore.kernel.org/linux-mtd/20210316141916.447493-1-rsalvaterra@gmail.com/ Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> --- CMakeLists.txt | 2 ++ libfstools/overlay.c | 2 ++ 2 files changed, 4 insertions(+)