[feature request] Optimize input encoding schemes (base64, etc.) #167

Open
opened 2026-01-29 20:39:12 +00:00 by claunia · 0 comments
Owner

Originally created by @buu700 on GitHub (May 21, 2017).

I'm not extremely familiar with the internals of Brotli or compression in general, so this may be a naive suggestion, but intuitively I think it aligns philosophically with Brotli's use of a built-in dictionary. Would it be practical for a future version of Brotli to detect strings of formats like base64 and hex and decode them to binary before compressing / re-encode them as part of the decompression process?

I noticed just now during a comparison between compressing a binary file and the equivalent base64 (https://github.com/kripken/emscripten/issues/5104#issuecomment-302939570) that the base64 version ended up larger, which it occurs to me shouldn't need to be the case given that the two contain almost exactly the same information.

Originally created by @buu700 on GitHub (May 21, 2017). I'm not extremely familiar with the internals of Brotli or compression in general, so this may be a naive suggestion, but intuitively I think it aligns philosophically with Brotli's use of a built-in dictionary. Would it be practical for a future version of Brotli to detect strings of formats like base64 and hex and decode them to binary before compressing / re-encode them as part of the decompression process? I noticed just now during a comparison between compressing a binary file and the equivalent base64 (https://github.com/kripken/emscripten/issues/5104#issuecomment-302939570) that the base64 version ended up larger, which it occurs to me shouldn't need to be the case given that the two contain almost exactly the same information.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#167