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

Closed
opened 2026-01-29 20:39:15 +00:00 by claunia · 2 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.
Author
Owner

@eustas commented on GitHub (May 21, 2017):

Thanks for the suggestion, but we tend to keep brotli compressor pure.
This is a feature for brotli framing format: #462.
Could you place your FR into framing format discussion, please.

@eustas commented on GitHub (May 21, 2017): Thanks for the suggestion, but we tend to keep brotli compressor pure. This is a feature for brotli framing format: #462. Could you place your FR into framing format discussion, please.
Author
Owner

@buu700 commented on GitHub (May 21, 2017):

Got it, thanks, I'll post it there.

@buu700 commented on GitHub (May 21, 2017): Got it, thanks, I'll post it there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#170