summaryrefslogtreecommitdiff
path: root/include/mbgl/util/compression.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/util/compression.hpp')
-rw-r--r--include/mbgl/util/compression.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/util/compression.hpp b/include/mbgl/util/compression.hpp
index 93a3ddb8bc..cbce764683 100644
--- a/include/mbgl/util/compression.hpp
+++ b/include/mbgl/util/compression.hpp
@@ -5,8 +5,15 @@
namespace mbgl {
namespace util {
+// Compresses data with the deflate algorithm.
std::string compress(const std::string& raw);
+
+// Decompresses data that is in deflate format, optionally wrapped in a gzip container.
std::string decompress(const std::string& raw);
+// Returns true when there's a good chance that the string can be compressed.
+// In particular, it returns false when the data is an already compressed image format.
+bool isCompressible(const std::string& raw);
+
} // namespace util
} // namespace mbgl