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

Unified Diff: src/pdf/SkDeflate.h

Issue 1681603002: SkDeflateWStream: support gzip output (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pdf/SkDeflate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkDeflate.h
diff --git a/src/pdf/SkDeflate.h b/src/pdf/SkDeflate.h
index 129d1bf8c3c7fe4203ca5cdc8e4c93c0722e773a..978b57edaf6ada9d7b3b8ee22bad8e8ff021e024 100644
--- a/src/pdf/SkDeflate.h
+++ b/src/pdf/SkDeflate.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2010 The Android Open Source Project
*
@@ -16,15 +15,26 @@
/**
* Wrap a stream in this class to compress the information written to
- * this stream using the Deflate algorithm. Uses Zlib's
- * Z_DEFAULT_COMPRESSION level.
+ * this stream using the Deflate algorithm.
*
* See http://en.wikipedia.org/wiki/DEFLATE
*/
class SkDeflateWStream final : public SkWStream {
public:
- /** Does not take ownership of the stream. */
- SkDeflateWStream(SkWStream*);
+ /** Does not take ownership of the stream.
+
+ @param compressionLevel - 0 is no compression; 1 is best
+ speed; 9 is best compression. The default, -1, is to use
+ zlib's Z_DEFAULT_COMPRESSION level.
+
+ @param gzip iff true, output a gzip file. "The gzip format is
+ a wrapper, documented in RFC 1952, around a deflate stream."
+ gzip adds a header with a magic number to the beginning of the
+ stream, alowing a client to identify a gzip file.
+ */
+ SkDeflateWStream(SkWStream*,
+ int compressionLevel = -1,
+ bool gzip = false);
/** The destructor calls finalize(). */
~SkDeflateWStream();
« no previous file with comments | « no previous file | src/pdf/SkDeflate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698