Open pascalw opened 4 years ago
@RoelN can you determine priority for this?
I just came across https://github.com/101arrowz/fflate which could perhaps replace inflate.js. It's only 8kb min/gzipped, but could even be smaller with treeshaking since we don't need all supported algorithms.
Hey, well spotted, thanks! Reading up on fflate, I saw tiny-inflate which might be an even better fit, as we only need decompression?
Worth to consider indeed. That does seem to be quite a bit slower, but might be ok for our usecase.
For inflate only fflate
should also be only 3KB btw, it supports threeshaking.
@pascalw I see your question for priority, sorry I missed that. It's one of the requirements before going live, so perhaps you could pick this up at your earliest convenience?
Unbrotli.js and inflate.js account for most of the weight of this module (66.9 KB gzipped, out of 92 KB). Which of the two is needed depends on the type of font file that is analyzed, so lazy loading these modules as needed could save quite a few bits.