Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using pako as a zlib.js implementation #1082

Open
baldurmen opened this issue Dec 8, 2019 · 3 comments
Open

Consider using pako as a zlib.js implementation #1082

baldurmen opened this issue Dec 8, 2019 · 3 comments

Comments

@baldurmen
Copy link
Contributor

Hi!

While working on the Debian package, I had a look at how the compression is done. At the moment, a minimized file (that is not properly copyrighted btw :P) in 3rdparty/inflate.min.js is loaded.

It seems this file comes from the zlib.js project.

It also seems nowadays people are using pako for an implementation of zlib in JS, as apparently it's faster.

pako happens to be packaged in Debian and I'm likely to try to patch js/weechat.js to use that instead. I'll try to send a patch when I have something working.

@lorenzhs
Copy link
Member

lorenzhs commented Dec 9, 2019

Yeah it's from zlib.js. The file starts with /** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */, which is I think enough to comply with the license.

Speed is rather irrelevant for us, there's not a lot of data going over the pipe. But pako's minified file is more than 3x the size (22 vs 7kb). I'm not convinced that there's a good argument to switch tbqh.

@JeremyMahieu
Copy link
Contributor

JeremyMahieu commented Aug 4, 2020

The browser should do this. See my request to have weechat changed so it supports this websocket extension that takes care of compression on the browser level.

Would a debian package still use a browser? If not, this might be off topic.

@baldurmen
Copy link
Contributor Author

Well, for now I've patched it in Debian and it seems to work pretty well :) (oh and glowing-bear should make it in the next Debian stable release \0/)

Would a debian package still use a browser? If not, this might be off topic.

It would yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants