Skip to content

Add support for zstd compression #186

@COUR4G3

Description

@COUR4G3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions