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

[3.x] Add binary MO translation file and brotli decoder and WOFF2 support. #59522

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Mar 25, 2022

Backport of #59276, #59275, #59483 and #59510

Decreases editor size by about 6.8 MB.

…support.

Use smaller .mo files instead of .po, if gettext is available.
Convert editor fonts to .woff2 format.
@bruvzg bruvzg marked this pull request as ready for review March 28, 2022 06:50
@bruvzg bruvzg requested review from a team as code owners March 28, 2022 06:50
@akien-mga akien-mga merged commit fa9e2f8 into godotengine:3.x Mar 28, 2022
@akien-mga
Copy link
Member

Thanks!

@skyatgit
Copy link

Can I use Brotli to decompress data in a PoolByteArray?

@Calinou
Copy link
Member

Calinou commented Mar 28, 2023

Can I use Brotli to decompress data in a PoolByteArray?

The Brotli compressor isn't exposed – it's only used internally to read WOFF2 fonts, as these use Brotli compression.

I'm not sure how much work it would be to add it as a compression mode in Godot's APIs (File, high-level multiplayer, etc). It would make sense to support Brotli compression for transparent decompression of HTTP requests, but we've had numerous issues when trying to implement transparent gzip decompression in the past.

cc @bruvzg

@bruvzg
Copy link
Member Author

bruvzg commented Mar 28, 2023

I'm not sure how much work it would be to add it as a compression mode in Godot's APIs (File, high-level multiplayer, etc). It would make sense to support Brotli compression for transparent decompression of HTTP requests, but we've had numerous issues when trying to implement transparent gzip decompression in the past.

For 4.x, adding it as another mode to the existing Compression class (which is used by FileAccessCompressed, ENetConnection and PackedByteArray.compress/decompress) should be easy, I'll take a look tomorrow.

@skyatgit
Copy link

Thank you very much. My project get Brotli compressed data from HTTP and WebSockets of 3. x and 4. x and stored it in the PoolByteArray. Therefore, I need to decompress the data in the PoolByteArray through Brotli

@skyatgit
Copy link

I have tried using the c # version of Godot, but there is no brotli related decompression algorithm in the .net framework 472. I added a third-party<PackageReference Include=" BrotliSharpLib "Version=" 0.3.3 "/>via NuGet, which can run normally on Windows, but when I export to the Android version, as long as I run to the decompression method, the program will crash.
but I don't have any more technical skills to solve the crash problem

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.

None yet

4 participants