101arrowz / fflate

High performance (de)compression in an 8kB package
https://101arrowz.github.io/fflate
MIT License
2.27k stars 79 forks source link

zlibSync compressed size is larger than pako #158

Closed yisibl closed 1 year ago

yisibl commented 1 year ago

I am trying to migrate ttf2woff from pako to fflate and found that the file size has become bigger.

You can run node example/index.js from this repository https://github.com/yisibl/ttf2woff-fflate/tree/master/fixtures

File Size
oldWoff(pako) : 9536
newWoff(fflate): 9592
101arrowz commented 1 year ago

For certain types of data fflate is slightly less effective than Pako, but it should rarely be much worse in compression ratio and will almost never be slower. A difference of about 1% as you're seeing here is not unusual.

yisibl commented 1 year ago

Thanks, for example for font files, is there a possibility to improve fflate?

101arrowz commented 1 year ago

It is possible but unlikely. Algorithmically, fflate is pretty much complete.

yisibl commented 1 year ago

Thanks!