Compression (#147)
* enable header detection in util::decompress and also use it for gziped data * expose zlib windowBits so mbgl::util::compress can be used for different formats * also expose windowBits in decompress function for consistency
This commit is contained in:
@@ -5,8 +5,10 @@
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
std::string compress(const std::string& raw);
|
||||
std::string decompress(const std::string& raw);
|
||||
enum CompressionFormat { ZLIB = 15, GZIP = 15 + 16, DEFLATE = -15, DETECT = 15 + 32 };
|
||||
|
||||
std::string compress(const std::string& raw, int windowBits = CompressionFormat::ZLIB);
|
||||
std::string decompress(const std::string& raw, int windowBits = CompressionFormat::DETECT);
|
||||
|
||||
} // namespace util
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user