Flutter Engine
The Flutter Engine
|
#include <SkDeflate.h>
Classes | |
struct | Impl |
Public Member Functions | |
SkDeflateWStream (SkWStream *, int compressionLevel, bool gzip=false) | |
~SkDeflateWStream () override | |
void | finalize () |
bool | write (const void *, size_t) override |
size_t | bytesWritten () const override |
Public Member Functions inherited from SkWStream | |
virtual | ~SkWStream () |
SkWStream () | |
virtual bool | write (const void *buffer, size_t size)=0 |
virtual void | flush () |
virtual size_t | bytesWritten () const =0 |
bool | write8 (U8CPU value) |
bool | write16 (U16CPU value) |
bool | write32 (uint32_t v) |
bool | writeText (const char text[]) |
bool | newline () |
bool | writeDecAsText (int32_t) |
bool | writeBigDecAsText (int64_t, int minDigits=0) |
bool | writeHexAsText (uint32_t, int minDigits=0) |
bool | writeScalarAsText (SkScalar) |
bool | writeBool (bool v) |
bool | writeScalar (SkScalar) |
bool | writePackedUInt (size_t) |
bool | writeStream (SkStream *input, size_t length) |
Additional Inherited Members | |
Static Public Member Functions inherited from SkWStream | |
static int | SizeOfPackedUInt (size_t value) |
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
Definition at line 23 of file SkDeflate.h.
Does not take ownership of the stream.
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. |
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. |
Definition at line 70 of file SkDeflate.cpp.
|
override |
The destructor calls finalize().
Definition at line 97 of file SkDeflate.cpp.
|
overridevirtual |
Implements SkWStream.
Definition at line 135 of file SkDeflate.cpp.
void SkDeflateWStream::finalize | ( | ) |
Write the end of the compressed stream. All subsequent calls to write() will fail. Subsequent calls to finalize() do nothing.
Definition at line 99 of file SkDeflate.cpp.
|
overridevirtual |
Called to write bytes to a SkWStream. Returns true on success
buffer | the address of at least size bytes to be written to the stream |
size | The number of bytes in buffer to write to the stream |
Implements SkWStream.
Definition at line 110 of file SkDeflate.cpp.