mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Suggest a rework for DictionaryData in java port. #523
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @XenoAmess on GitHub (Oct 21, 2024).
just, don't make a 123KB class if not have to. that is not a good way.
a better practice would be:
would be glad to impl it if you would arrange time for the code review.
@eustas commented on GitHub (Nov 19, 2024):
This design has a long history and meets some non-obvious requirements:
With current implementation, reflection is not triggered if embedder has already invoked
Dictionary.setData; in such case provided data could have been obtained by different means, e.g. loaded from resources.If the main problem is class size, then you can compile/link with alternative DictionaryData implementation that loads from resources.
Please provide more context on the problem you are facing, and we could think how to improve the codebase.
@XenoAmess commented on GitHub (Nov 19, 2024):
I'm using graalvm native image, so of course as small class as possible and as few reflections as possible means something to me....
But the real reason if I remember it correctly why I give up with brotli last month is I cannot uncompress some brotli file (generated by brotli cli) using the java client...
now I'm using zip as alternative.
@eustas commented on GitHub (Nov 20, 2024):
Got it. I'll prepare helper for reflection-less load-from-resources soon; the biggest question is - what build system (or binary repo) you use?