Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs:support zipfs,can mount zipfile #10804

Merged
merged 2 commits into from Sep 26, 2023

Conversation

anjiahao1
Copy link
Contributor

@anjiahao1 anjiahao1 commented Sep 25, 2023

Summary

we can mount a zipfile in nuttx use mount command like this:

mount -t zipfs -o /data/test.zip /zip

The zipfs is a read only file system,The advantage is that it does not occupy additional space when reading the decompressed file.

When used, reading and decompression operations are simultaneous. The known disadvantage is that when using seek to read forward, it will reopen and cause slow speed problems.

Impact

fs

Testing

./tools/configure.sh sim:zipfs
./nuttx
nsh> mount -t hostfs -o /home/ajh/work /host
nsh> mount -t zipfs -o /host/test.zip /zip
nsh> ls /zip
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

sikp the format error

depends on apps-2094

@anjiahao1 anjiahao1 force-pushed the zipfs_manline branch 2 times, most recently from 3350d63 to a4b4c49 Compare September 25, 2023 09:33
fs/zipfs/zip_vfs.c Outdated Show resolved Hide resolved
we can mount a zipfile in nuttx use mount command like this:

mount -t zipfs -o /data/test.zip /zip

The zipfs is a read only file system,The advantage is that it
does not occupy additional space when reading the decompressed file.

When used, reading and decompression operations are simultaneous.
The known disadvantage is that when using seek to read forward,
it will reopen and cause slow speed problems.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
@acassis
Copy link
Contributor

acassis commented Sep 25, 2023

wow! Very nice feature @anjiahao1 ! Please include some basic Documentation/ to let more people to discover about it.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
@anjiahao1
Copy link
Contributor Author

@acassis I added a simple document to introduce zipfs

@xiaoxiang781216 xiaoxiang781216 merged commit ae9d905 into apache:master Sep 26, 2023
26 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.4.0 Dec 27, 2023
@jerpelea jerpelea moved this from To-Add to fs in Release Notes - 12.4.0 Jan 8, 2024
@jerpelea jerpelea moved this from fs to processed in Release Notes - 12.4.0 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants