Commit Graph

3 Commits

Author SHA1 Message Date
Jiyong Park f5ff33cf49 zipfuse: optimize for uncompressed zip entries
Previously, when a zip entry is opened, its entire content was copied
into zipfuse and kept there until the file is closed. This is a waste of
memory because if the zip entry is stored uncompressed, it can be
directly read from the containing zip file.

This CL implements the optimization.

Bug: 187878241
Test: atest zipfuse.test
Change-Id: Ia2d516d4d03d699ee7da72f576f337bd73516427
2021-08-31 08:45:07 +09:00
Jiyong Park e6587cafc6 zipfuse: supports zip on block device
Add a test case to ensure that zipfuse works with a block device whose
content is backed by a zip file. Fortunately, zip-rs already supports
reading a zip file from a block device: it locates the end of central
directory record by reverse-scanning a file from the end.

Bug: 186377508
Test: cargo test (android test missing because we don't have the
loopdevice crate for Android, which is fine)

Change-Id: I8fbbfd18a2a0df2a550e3f679ba74ba603b59efd
2021-05-24 08:18:19 +09:00
Jiyong Park 331d1ea104 zipfuse: a read-only fuse implementation for zip archive
zipfuse is a read-only FUSE implementation for zip archive. It will be
used to make files embedded in APKs (which are zip files) be accessible
as regular files in microdroid.

Bug: 186377508
Test: atest ZipFuseTest
Change-Id: Idf0fb4d32b8a2d957da9188fedeebb5610050e65
2021-05-12 19:47:41 +09:00