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

Side by Side Diff: third_party/zlib/google/zip_internal.h

Issue 2023703002: Beginning work on GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Really add //build. Add dart_bootstrap rule. Created 4 years, 6 months 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 unified diff | Download patch
« no previous file with comments | « third_party/zlib/google/zip.gyp ('k') | third_party/zlib/google/zip_internal.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef THIRD_PARTY_ZLIB_GOOGLE_ZIP_INTERNAL_H_
6 #define THIRD_PARTY_ZLIB_GOOGLE_ZIP_INTERNAL_H_
7
8 #include <string>
9
10 #include "build/build_config.h"
11
12 #if defined(OS_WIN)
13 #include <windows.h>
14 #endif
15
16 #if defined(USE_SYSTEM_MINIZIP)
17 #include <minizip/unzip.h>
18 #include <minizip/zip.h>
19 #else
20 #include "third_party/zlib/contrib/minizip/unzip.h"
21 #include "third_party/zlib/contrib/minizip/zip.h"
22 #endif
23
24 namespace base {
25 class FilePath;
26 }
27
28 // Utility functions and constants used internally for the zip file
29 // library in the directory. Don't use them outside of the library.
30 namespace zip {
31 namespace internal {
32
33 // Opens the given file name in UTF-8 for unzipping, with some setup for
34 // Windows.
35 unzFile OpenForUnzipping(const std::string& file_name_utf8);
36
37 #if defined(OS_POSIX)
38 // Opens the file referred to by |zip_fd| for unzipping.
39 unzFile OpenFdForUnzipping(int zip_fd);
40 #endif
41
42 #if defined(OS_WIN)
43 // Opens the file referred to by |zip_handle| for unzipping.
44 unzFile OpenHandleForUnzipping(HANDLE zip_handle);
45 #endif
46
47 // Creates a custom unzFile object which reads data from the specified string.
48 // This custom unzFile object overrides the I/O API functions of zlib so it can
49 // read data from the specified string.
50 unzFile PrepareMemoryForUnzipping(const std::string& data);
51
52 // Opens the given file name in UTF-8 for zipping, with some setup for
53 // Windows. |append_flag| will be passed to zipOpen2().
54 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag);
55
56 #if defined(OS_POSIX)
57 // Opens the file referred to by |zip_fd| for zipping. |append_flag| will be
58 // passed to zipOpen2().
59 zipFile OpenFdForZipping(int zip_fd, int append_flag);
60 #endif
61
62 // Returns a zip_fileinfo with the last modification date of |path| set.
63 zip_fileinfo GetFileInfoForZipping(const base::FilePath& path);
64
65 // Wrapper around zipOpenNewFileInZip4 which passes most common options.
66 bool ZipOpenNewFileInZip(zipFile zip_file,
67 const std::string& str_path,
68 const zip_fileinfo* file_info);
69
70 const int kZipMaxPath = 256;
71 const int kZipBufSize = 8192;
72
73 } // namespace internal
74 } // namespace zip
75
76 #endif // THIRD_PARTY_ZLIB_GOOGLE_ZIP_INTERNAL_H_
OLDNEW
« no previous file with comments | « third_party/zlib/google/zip.gyp ('k') | third_party/zlib/google/zip_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698