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
diff --git a/third_party/ijar/zip.h b/third_party/ijar/zip.h
index 046072d..c548cb3 100644
--- a/third_party/ijar/zip.h
+++ b/third_party/ijar/zip.h
@@ -61,9 +61,10 @@
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);