aboutsummaryrefslogtreecommitdiff
path: root/src/serialization.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialization.cpp')
-rw-r--r--src/serialization.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serialization.cpp b/src/serialization.cpp
index c324ca0fd..6a43d9190 100644
--- a/src/serialization.cpp
+++ b/src/serialization.cpp
@@ -105,6 +105,12 @@ void compressZlib(SharedBuffer<u8> data, std::ostream &os)
}
+void compressZlib(const std::string &data, std::ostream &os)
+{
+ SharedBuffer<u8> databuf((u8*)data.c_str(), data.size());
+ compressZlib(databuf, os);
+}
+
void decompressZlib(std::istream &is, std::ostream &os)
{
z_stream z;