summaryrefslogtreecommitdiffstats
path: root/src/StringCompression.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-17 20:01:14 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-17 20:01:14 +0100
commita54cbba0fdf697999e8ac4aff2f5ea436c98edc3 (patch)
tree7f1d8d463d0d70ba888c992f80681a1775a31b6b /src/StringCompression.cpp
parentAPIDump: Updated cPluginManager:GetAllPlugins(). (diff)
downloadcuberite-a54cbba0fdf697999e8ac4aff2f5ea436c98edc3.tar
cuberite-a54cbba0fdf697999e8ac4aff2f5ea436c98edc3.tar.gz
cuberite-a54cbba0fdf697999e8ac4aff2f5ea436c98edc3.tar.bz2
cuberite-a54cbba0fdf697999e8ac4aff2f5ea436c98edc3.tar.lz
cuberite-a54cbba0fdf697999e8ac4aff2f5ea436c98edc3.tar.xz
cuberite-a54cbba0fdf697999e8ac4aff2f5ea436c98edc3.tar.zst
cuberite-a54cbba0fdf697999e8ac4aff2f5ea436c98edc3.zip
Diffstat (limited to 'src/StringCompression.cpp')
-rw-r--r--src/StringCompression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StringCompression.cpp b/src/StringCompression.cpp
index e15058840..5b9a3bb0a 100644
--- a/src/StringCompression.cpp
+++ b/src/StringCompression.cpp
@@ -11,7 +11,7 @@
/// Compresses a_Data into a_Compressed; returns Z_XXX error constants same as zlib's compress2()
-int CompressString(const char * a_Data, int a_Length, AString & a_Compressed)
+int CompressString(const char * a_Data, int a_Length, AString & a_Compressed, int a_Factor)
{
uLongf CompressedSize = compressBound(a_Length);
@@ -19,7 +19,7 @@ int CompressString(const char * a_Data, int a_Length, AString & a_Compressed)
// It saves us one allocation and one memcpy of the entire compressed data
// It may not work on some STL implementations! (Confirmed working on MSVC 2008 & 2010)
a_Compressed.resize(CompressedSize);
- int errorcode = compress2( (Bytef*)a_Compressed.data(), &CompressedSize, (const Bytef*)a_Data, a_Length, Z_DEFAULT_COMPRESSION);
+ int errorcode = compress2( (Bytef*)a_Compressed.data(), &CompressedSize, (const Bytef*)a_Data, a_Length, a_Factor);
if (errorcode != Z_OK)
{
return errorcode;