zipfs:Add Documentation for zipfs

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2023-09-26 21:50:34 +08:00 committed by Xiang Xiao
parent a2c5cb729a
commit ae9d9054af
1 changed files with 41 additions and 0 deletions

View File

@ -213,3 +213,44 @@ Blank line && New line delim
/dev/partition7 offset 0x00480000, size 0x00010000 /dev/partition7 offset 0x00480000, size 0x00010000
/dev/data offset 0x00500000, size 0x00aff000 /dev/data offset 0x00500000, size 0x00aff000
/dev/txtable offset 0x00fff000, size 0x00001000 /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/<your host name>/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