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

Expose brotli decompression to the scripting API. #75447

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Mar 29, 2023

Exposes brotli decompression it to the scripting API via new FileAccess.COMPRESSION_BROTLI CompressionMode constant (usable with any script function, which takes CompressionMode argument).

See #59522 (comment)

@bruvzg
Copy link
Member Author

bruvzg commented Mar 29, 2023

Encoder is quite slow and big, so not sure if it worth it, might be better to keep it as decode only.

@Calinou
Copy link
Member

Calinou commented Mar 29, 2023

Encoder is quite slow and big, so not sure if it worth it, might be better to keep it as decode only.

Indeed, I'd make it decode-only as Brotli seems to have fallen out of fashion in favor of Zstandard lately. Brotli is mostly kept alive because it's part of HTTP2 specification and WOFF2. For high-level multiplayer API compression, the currently available choices seem to work well enough.

@bruvzg bruvzg changed the title Add brotli encoder, expose brotli compression/decompression to the scripting API. Expose brotli decompression to the scripting API. Mar 29, 2023
@bruvzg
Copy link
Member Author

bruvzg commented Mar 29, 2023

Changed it to decompression only (removed encoder and multiplayer API changes), compression benefits are small and encoder is 10 times slower than ZSTD so not worth it. Adding decompression support is reasonable since we have it for WOFF2 support anyway, so it's free.

@bruvzg bruvzg marked this pull request as ready for review March 30, 2023 08:38
@bruvzg bruvzg requested review from a team as code owners March 30, 2023 08:38
@akien-mga akien-mga modified the milestones: 4.x, 4.1 Apr 3, 2023
@akien-mga akien-mga merged commit efb42c3 into godotengine:master Apr 25, 2023
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants