Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7628)

Unified Diff: chrome/common/zip_internal.cc

Issue 8873039: Add an API to unpack Zip files directly from and to file descriptors. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/zip_internal.cc
diff --git a/chrome/common/zip_internal.cc b/chrome/common/zip_internal.cc
index ddcfd00a360fb1d01383d27f04aa75669e92d7f5..4ee9d46b403cc8ae2c1edad4a29a520c8a872d00 100644
--- a/chrome/common/zip_internal.cc
+++ b/chrome/common/zip_internal.cc
@@ -81,6 +81,14 @@ unzFile OpenForUnzipping(const std::string& file_name_utf8) {
return unzOpen2(file_name_utf8.c_str(), zip_func_ptrs);
}
+#if defined(OS_POSIX)
+unzFile OpenFdForUnzipping(const int fd) {
satorux1 2011/12/12 04:54:14 fd -> zip_fd, to be consistent with the function d
Jorge Lucangeli Obes 2011/12/12 23:34:35 Done.
+ zlib_filefunc_def zip_funcs;
+ fill_fdopen_filefunc(&zip_funcs, fd);
+ return unzOpen2("fd", &zip_funcs);
satorux1 2011/12/12 04:54:14 What's "fd"? Is this a dummy file name? Would be n
Jorge Lucangeli Obes 2011/12/12 23:34:35 Done.
+}
+#endif
+
zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag) {
zlib_filefunc_def* zip_func_ptrs = NULL;
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698