1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/include/core/SkFlate.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2010 The Android Open Source Project 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 + 1.13 +#ifndef SkFlate_DEFINED 1.14 +#define SkFlate_DEFINED 1.15 + 1.16 +#include "SkTypes.h" 1.17 + 1.18 +class SkData; 1.19 +class SkWStream; 1.20 +class SkStream; 1.21 + 1.22 +/** \class SkFlate 1.23 + A class to provide access to the flate compression algorithm. 1.24 +*/ 1.25 +class SkFlate { 1.26 +public: 1.27 + /** Indicates if the flate algorithm is available. 1.28 + */ 1.29 + static bool HaveFlate(); 1.30 + 1.31 + /** 1.32 + * Use the flate compression algorithm to compress the data in src, 1.33 + * putting the result into dst. Returns false if an error occurs. 1.34 + */ 1.35 + static bool Deflate(SkStream* src, SkWStream* dst); 1.36 + 1.37 + /** 1.38 + * Use the flate compression algorithm to compress the data in src, 1.39 + * putting the result into dst. Returns false if an error occurs. 1.40 + */ 1.41 + static bool Deflate(const void* src, size_t len, SkWStream* dst); 1.42 + 1.43 + /** 1.44 + * Use the flate compression algorithm to compress the data, 1.45 + * putting the result into dst. Returns false if an error occurs. 1.46 + */ 1.47 + static bool Deflate(const SkData*, SkWStream* dst); 1.48 + 1.49 + /** Use the flate compression algorithm to decompress the data in src, 1.50 + putting the result into dst. Returns false if an error occurs. 1.51 + */ 1.52 + static bool Inflate(SkStream* src, SkWStream* dst); 1.53 +}; 1.54 + 1.55 +#endif