Skip to content

Commit

Permalink
uses zlib instead that offers a better compression ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
mvilanova committed Dec 5, 2024
1 parent 5fa1fb6 commit 2f7e4e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dispatch/plugins/dispatch_aws/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"""

import base64
import gzip
import json
import logging
import zlib
from typing import TypedDict

import boto3
Expand All @@ -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")


Expand Down

0 comments on commit 2f7e4e9

Please sign in to comment.