diff --git a/Documentation/components/filesystem.rst b/Documentation/components/filesystem.rst index 3fce00770d..5e1dfc6cb7 100644 --- a/Documentation/components/filesystem.rst +++ b/Documentation/components/filesystem.rst @@ -213,3 +213,44 @@ Blank line && New line delim /dev/partition7 offset 0x00480000, size 0x00010000 /dev/data offset 0x00500000, size 0x00aff000 /dev/txtable offset 0x00fff000, size 0x00001000 + +ZipFS +===== + +Zipfs is a read only file system that mounts a zip file as a NuttX file system through the NuttX VFS interface. +This allows users to read files while decompressing them, without requiring additional storage space. + +CONFIG +------ + +.. code-block:: c + + CONFIG_FS_ZIPFS=y + CONFIG_LIB_ZLIB=y + +Example +------- + +1. `./tools/configure.sh sim:zipfs` build sim platform with zipfs support. + +2. `make` build NuttX. + +3. `./nuttx` run NuttX. + +4. `nsh> mount -t hostfs -o /home//work /host` mount host directory to /host. + +5. `nsh> mount -t zipfs -o /host/test.zip /zip` mount zip file to /zipfs. + +6. Use cat/ls command to test. + +.. code-block:: c + + nsh> ls /zip + /zip: + a/1 + a/2 + nsh> cat /zip/a/1 + this is zipfs test 1 + nsh> cat /zip/a/2 + this is zipfs test 2 +