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

πŸ—œοΈ Support zstd compression algorithm #129

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

tmdvs
Copy link
Member

@tmdvs tmdvs commented Sep 10, 2024

We have noticed that some parts of the fig file are now compressed using zstd. This leads to a crash when importing newly exported figma documents.

This change checks the first four bytes of the compressed range to look for the zstd "magic number" and switches decompression libraries based on the result.

@tmdvs tmdvs force-pushed the fix/support-zstd-compression-algorithm branch from e08bb0b to 241b706 Compare September 10, 2024 12:48
src/figformat/decodefig.py Outdated Show resolved Hide resolved
@tmdvs tmdvs force-pushed the fix/support-zstd-compression-algorithm branch 3 times, most recently from c8d0914 to 966ee54 Compare September 10, 2024 13:51
@tmdvs tmdvs force-pushed the fix/support-zstd-compression-algorithm branch from 966ee54 to b74ff9c Compare September 10, 2024 14:22
@tmdvs tmdvs marked this pull request as ready for review September 10, 2024 15:54
@tmdvs tmdvs merged commit 4336fda into main Sep 11, 2024
4 checks passed
@tmdvs tmdvs deleted the fix/support-zstd-compression-algorithm branch September 11, 2024 07:18
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

Successfully merging this pull request may close these issues.

1 participant