diff options
author | Tianjie Xu | 2016-10-18 16:57:30 -0500 |
---|---|---|
committer | android-build-merger | 2016-10-18 16:57:30 -0500 |
commit | b2ca85184b23eb8cc5251e28dcf6480dc426ddfa (patch) | |
tree | 6a282d923ceb2530fd8139a395f0299b39f03612 /include | |
parent | 84dafd104b838bcba54298e575035def50ed7077 (diff) | |
parent | 4bc51d1ea48dcd11e1b4db084145c2d0de8ddbdb (diff) | |
download | platform-system-core-b2ca85184b23eb8cc5251e28dcf6480dc426ddfa.tar.gz platform-system-core-b2ca85184b23eb8cc5251e28dcf6480dc426ddfa.tar.xz platform-system-core-b2ca85184b23eb8cc5251e28dcf6480dc426ddfa.zip |
Merge "Add functions in recovery/minzip to libziparchive"
am: 4bc51d1ea4
Change-Id: Ica94e8050286bed1c5bc23a33305050ab8da8ec5
Diffstat (limited to 'include')
-rw-r--r-- | include/ziparchive/zip_archive.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ziparchive/zip_archive.h b/include/ziparchive/zip_archive.h index 4f68c3b36..fc845a44e 100644 --- a/include/ziparchive/zip_archive.h +++ b/include/ziparchive/zip_archive.h | |||
@@ -130,6 +130,8 @@ int32_t OpenArchive(const char* fileName, ZipArchiveHandle* handle); | |||
130 | int32_t OpenArchiveFd(const int fd, const char* debugFileName, | 130 | int32_t OpenArchiveFd(const int fd, const char* debugFileName, |
131 | ZipArchiveHandle *handle, bool assume_ownership = true); | 131 | ZipArchiveHandle *handle, bool assume_ownership = true); |
132 | 132 | ||
133 | int32_t OpenArchiveFromMemory(void* address, size_t length, const char* debugFileName, | ||
134 | ZipArchiveHandle *handle); | ||
133 | /* | 135 | /* |
134 | * Close archive, releasing resources associated with it. This will | 136 | * Close archive, releasing resources associated with it. This will |
135 | * unmap the central directory of the zipfile and free all internal | 137 | * unmap the central directory of the zipfile and free all internal |
@@ -214,6 +216,17 @@ int GetFileDescriptor(const ZipArchiveHandle handle); | |||
214 | 216 | ||
215 | const char* ErrorCodeString(int32_t error_code); | 217 | const char* ErrorCodeString(int32_t error_code); |
216 | 218 | ||
219 | #if !defined(_WIN32) | ||
220 | typedef bool (*ProcessZipEntryFunction)(const uint8_t* buf, size_t buf_size, void* cookie); | ||
221 | |||
222 | /* | ||
223 | * Stream the uncompressed data through the supplied function, | ||
224 | * passing cookie to it each time it gets called. | ||
225 | */ | ||
226 | int32_t ProcessZipEntryContents(ZipArchiveHandle handle, ZipEntry* entry, | ||
227 | ProcessZipEntryFunction func, void* cookie); | ||
228 | #endif | ||
229 | |||
217 | __END_DECLS | 230 | __END_DECLS |
218 | 231 | ||
219 | #endif // LIBZIPARCHIVE_ZIPARCHIVE_H_ | 232 | #endif // LIBZIPARCHIVE_ZIPARCHIVE_H_ |