blob: e4c1417d910d4d8c75f7a7f7aa42dc1fd8fc41e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*
* 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.
*/
#ifndef SkFlate_DEFINED
#define SkFlate_DEFINED
#include "SkTypes.h"
class SkData;
class SkWStream;
class SkStream;
/** \class SkFlate
A class to provide access to the flate compression algorithm.
*/
class SkFlate {
public:
/** Indicates if the flate algorithm is available.
*/
static bool HaveFlate();
/**
* Use the flate compression algorithm to compress the data in src,
* putting the result into dst. Returns false if an error occurs.
*/
static bool Deflate(SkStream* src, SkWStream* dst);
/**
* Use the flate compression algorithm to compress the data in src,
* putting the result into dst. Returns false if an error occurs.
*/
static bool Deflate(const void* src, size_t len, SkWStream* dst);
/**
* Use the flate compression algorithm to compress the data,
* putting the result into dst. Returns false if an error occurs.
*/
static bool Deflate(const SkData*, SkWStream* dst);
/** Use the flate compression algorithm to decompress the data in src,
putting the result into dst. Returns false if an error occurs.
*/
static bool Inflate(SkStream* src, SkWStream* dst);
};
#endif
|