From c6707ea945d6e149f7c55796fe18664f135f840e Mon Sep 17 00:00:00 2001 From: Kurt Thiemann Date: Thu, 9 Sep 2021 16:17:36 +0200 Subject: [PATCH] fix compressed string writers --- src/IO/Writer/GZipCompressedStringWriter.php | 2 +- src/IO/Writer/ZLibCompressedStringWriter.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/IO/Writer/GZipCompressedStringWriter.php b/src/IO/Writer/GZipCompressedStringWriter.php index 88085f8..9c87412 100644 --- a/src/IO/Writer/GZipCompressedStringWriter.php +++ b/src/IO/Writer/GZipCompressedStringWriter.php @@ -6,6 +6,6 @@ class GZipCompressedStringWriter extends StringWriter { public function getStringData(): string { - return zlib_encode(parent::getStringData(), ZLIB_ENCODING_DEFLATE); + return gzencode(parent::getStringData(), ZLIB_ENCODING_DEFLATE); } } diff --git a/src/IO/Writer/ZLibCompressedStringWriter.php b/src/IO/Writer/ZLibCompressedStringWriter.php index eceb2de..470e0a7 100644 --- a/src/IO/Writer/ZLibCompressedStringWriter.php +++ b/src/IO/Writer/ZLibCompressedStringWriter.php @@ -4,5 +4,8 @@ class ZLibCompressedStringWriter extends StringWriter { - + public function getStringData(): string + { + return zlib_encode(parent::getStringData(), ZLIB_ENCODING_DEFLATE); + } } \ No newline at end of file