aboutsummaryrefslogtreecommitdiffstats
path: root/minzip/Zip.h
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-02-01 14:40:12 -0800
committerDoug Zongker <dougz@android.com>2010-02-01 14:40:12 -0800
commit6aece33b3f3af6a161e326af36bc894427fcf5ad (patch)
treeb164457ed1f664a0d195f30933b70386687a0887 /minzip/Zip.h
parentaa062531aa3e740b6cf7d3690fd5310e7fdf03f2 (diff)
downloadbootable_recovery-6aece33b3f3af6a161e326af36bc894427fcf5ad.zip
bootable_recovery-6aece33b3f3af6a161e326af36bc894427fcf5ad.tar.gz
bootable_recovery-6aece33b3f3af6a161e326af36bc894427fcf5ad.tar.bz2
add a one-argument version of package_extract_file
Add a version of package_extract_file that returns the file data as its return value (to be consumed by some other edify function that expects to receive a bunch of binary data as an argument). Lets us avoid having two copies of a big file in memory (extracting it into /tmp, which is a ramdisk, and then having something load it into memory) when doing things like radio updates. Change-Id: Ie26ece5fbae457eb0ddcd8a13d74d78a769fbc70
Diffstat (limited to 'minzip/Zip.h')
-rw-r--r--minzip/Zip.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/minzip/Zip.h b/minzip/Zip.h
index 1c1df2f..9f99fba 100644
--- a/minzip/Zip.h
+++ b/minzip/Zip.h
@@ -169,6 +169,13 @@ bool mzExtractZipEntryToFile(const ZipArchive *pArchive,
const ZipEntry *pEntry, int fd);
/*
+ * Inflate and write an entry to a memory buffer, which must be long
+ * enough to hold mzGetZipEntryUncomplen(pEntry) bytes.
+ */
+bool mzExtractZipEntryToBuffer(const ZipArchive *pArchive,
+ const ZipEntry *pEntry, unsigned char* buffer);
+
+/*
* Inflate all entries under zipDir to the directory specified by
* targetDir, which must exist and be a writable directory.
*