diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2015-08-31 12:22:14 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2015-08-31 19:13:39 +0000 |
commit | 3a160e754eaa27be157f463c42ecea045906516f (patch) | |
tree | 9eb5831e0d102a672a28c4184742e2af17a006fa /third_party/ijar/zip.h | |
parent | 7ace50057756b7d2fcb7a11e1ef2375704f02d06 (diff) |
Add support for compression in //third_party/ijar:zipper
Add the 'C' flag to //third_party/ijar:zipper to try to compress
files using the DEFLATE algorithm. To avoid regression, creation
of uncompressed ZIP files is still the default.
--
Change-Id: I8ad7182d8f6f152abd56ae472a406cbb8d39fb64
Reviewed-on: https://bazel-review.googlesource.com/#/c/1821/
MOS_MIGRATED_REVID=101925953
Diffstat (limited to 'third_party/ijar/zip.h')
-rw-r--r-- | third_party/ijar/zip.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/third_party/ijar/zip.h b/third_party/ijar/zip.h index 046072d25a..c548cb3cdb 100644 --- a/third_party/ijar/zip.h +++ b/third_party/ijar/zip.h @@ -61,9 +61,10 @@ class ZipBuilder { virtual u1* NewFile(const char* filename, const u4 attr) = 0; // Finish writing a file and specify its length. After calling this method - // one should not reuse the pointer given by NewFile. + // one should not reuse the pointer given by NewFile. The file can be + // compressed using the deflate algorithm by setting `compress` to true. // On failure, returns -1 and GetError() will return an non-empty message. - virtual int FinishFile(size_t filelength) = 0; + virtual int FinishFile(size_t filelength, bool compress = false) = 0; // Write an empty file, it is equivalent to: // NewFile(filename, 0); |