#include "src/pdf/SkDeflate.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTFitsIn.h"
#include "include/private/base/SkTo.h"
#include "src/core/SkTraceEvent.h"
#include <algorithm>
#include <cstdint>
#include <cstring>
#include "zlib.h"
namespace {
template <typename T> void* skia_alloc_func(void*, T items, T size) { … }
void skia_free_func(void*, void* address) { … }
}
#define SKDEFLATEWSTREAM_INPUT_BUFFER_SIZE …
#define SKDEFLATEWSTREAM_OUTPUT_BUFFER_SIZE …
static void do_deflate(int flush,
z_stream* zStream,
SkWStream* out,
unsigned char* inBuffer,
size_t inBufferSize) { … }
struct SkDeflateWStream::Impl { … };
SkDeflateWStream::SkDeflateWStream(SkWStream* out,
int compressionLevel,
bool gzip)
: … { … }
SkDeflateWStream::~SkDeflateWStream() { … }
void SkDeflateWStream::finalize() { … }
bool SkDeflateWStream::write(const void* void_buffer, size_t len) { … }
size_t SkDeflateWStream::bytesWritten() const { … }