aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkDeflate.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-02-08 09:34:34 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-08 09:34:35 -0800
commite365bfa1e7944a15505e7c00df71551e66204ac4 (patch)
tree5495445d13eff5e36010fc7cfe15537cf50b51cf /src/pdf/SkDeflate.h
parent13a036b7ebfd1faeef168979cd6dbb09d0868619 (diff)
SkDeflateWStream: support gzip output
Diffstat (limited to 'src/pdf/SkDeflate.h')
-rw-r--r--src/pdf/SkDeflate.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/pdf/SkDeflate.h b/src/pdf/SkDeflate.h
index 129d1bf8c3..978b57edaf 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();