/* * Copyright 2010 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.
*/
/** * Wrap a stream in this class to compress the information written to * 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.
@param compressionLevel 1 is best speed; 9 is best compression. The default, -1, is to use zlib's Z_DEFAULT_COMPRESSION level. 0 would be no compression, but due to broken zlibs, users should handle that themselves.
@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, allowing a client to identify a gzip file.
*/
SkDeflateWStream(SkWStream*, int compressionLevel, bool gzip = false);
/** The destructor calls finalize(). */
~SkDeflateWStream() override;
/** Write the end of the compressed stream. All subsequent calls to
write() will fail. Subsequent calls to finalize() do nothing. */ void finalize();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.