From 2f7e4e94f3028bebab1cec694469d62ecd28e7ee Mon Sep 17 00:00:00 2001 From: Marc Vilanova Date: Wed, 4 Dec 2024 17:20:52 -0800 Subject: [PATCH] uses zlib instead that offers a better compression ratio --- src/dispatch/plugins/dispatch_aws/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dispatch/plugins/dispatch_aws/plugin.py b/src/dispatch/plugins/dispatch_aws/plugin.py index 8611cae1b720..f1bf1f7912d7 100644 --- a/src/dispatch/plugins/dispatch_aws/plugin.py +++ b/src/dispatch/plugins/dispatch_aws/plugin.py @@ -7,9 +7,9 @@ """ import base64 -import gzip import json import logging +import zlib from typing import TypedDict import boto3 @@ -31,9 +31,9 @@ def decompress_json(compressed_str: str) -> str: - """Decompress a base64 encoded gzipped JSON string.""" + """Decompress a base64 encoded zlibed JSON string.""" decoded = base64.b64decode(compressed_str) - decompressed = gzip.decompress(decoded) + decompressed = zlib.decompress(decoded) return decompressed.decode("utf-8")