Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: src/pdf/SkDeflate.h

Issue 1298243002: SkPDF/Deflate: clean up old SkFlate code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-18 (Tuesday) 16:19:01 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkFlate_DEFINED 10 #ifndef SkFlate_DEFINED
11 #define SkFlate_DEFINED 11 #define SkFlate_DEFINED
12 12
13 #include "SkTypes.h" 13 #include "SkTypes.h"
14 14
15 #include "SkStream.h" 15 #include "SkStream.h"
16 class SkData;
17
18 /** \class SkFlate
19 A class to provide access to the flate compression algorithm.
20 */
21 class SkFlate {
22 public:
23 /**
24 * Use the flate compression algorithm to compress the data in src,
25 * putting the result into dst. Returns false if an error occurs.
26 */
27 static bool Deflate(SkStream* src, SkWStream* dst);
28
29 /**
30 * Use the flate compression algorithm to compress the data in src,
31 * putting the result into dst. Returns false if an error occurs.
32 */
33 static bool Deflate(const void* src, size_t len, SkWStream* dst);
34
35 /**
36 * Use the flate compression algorithm to compress the data,
37 * putting the result into dst. Returns false if an error occurs.
38 */
39 static bool Deflate(const SkData*, SkWStream* dst);
40
41 /** Use the flate compression algorithm to decompress the data in src,
42 putting the result into dst. Returns false if an error occurs.
43 */
44 static bool Inflate(SkStream* src, SkWStream* dst);
45 };
46 16
47 /** 17 /**
48 * Wrap a stream in this class to compress the information written to 18 * Wrap a stream in this class to compress the information written to
49 * this stream using the Deflate algorithm. Uses Zlib's 19 * this stream using the Deflate algorithm. Uses Zlib's
50 * Z_DEFAULT_COMPRESSION level. 20 * Z_DEFAULT_COMPRESSION level.
51 * 21 *
52 * See http://en.wikipedia.org/wiki/DEFLATE 22 * See http://en.wikipedia.org/wiki/DEFLATE
53 */ 23 */
54 class SkDeflateWStream : public SkWStream { 24 class SkDeflateWStream : public SkWStream {
55 public: 25 public:
(...skipping 10 matching lines...) Expand all
66 // The SkWStream interface: 36 // The SkWStream interface:
67 bool write(const void*, size_t) override; 37 bool write(const void*, size_t) override;
68 size_t bytesWritten() const override; 38 size_t bytesWritten() const override;
69 39
70 private: 40 private:
71 struct Impl; 41 struct Impl;
72 SkAutoTDelete<Impl> fImpl; 42 SkAutoTDelete<Impl> fImpl;
73 }; 43 };
74 44
75 #endif // SkFlate_DEFINED 45 #endif // SkFlate_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkStreamPriv.h ('k') | src/pdf/SkDeflate.cpp » ('j') | tests/StreamTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698