Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for zstd compression #186

Open
COUR4G3 opened this issue Jun 20, 2024 · 0 comments
Open

Add support for zstd compression #186

COUR4G3 opened this issue Jun 20, 2024 · 0 comments

Comments

@COUR4G3
Copy link

COUR4G3 commented Jun 20, 2024

Encountered a tilemap with zstd compression, easy enough to load and save it without but thought since there was a module on pip for zstd, might just add some optional support - if zstd is installed, then support decompression.

Something like:

try:
    import zstd
except ImportError:
    zstd = False

# ... in decompression code

if compression == "zstd":
    if zstd:
        data = zstd.decompress(data)
    else:
        raise ValueError("layer compression zstd is not supported. Install zstd to enable support.")

Already have a PR drafted if there is interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant