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
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
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