Does that mean both gzipping and unzipping happens in Elixir code instead of nginx or another reverse proxy? Is it implemented in a way that supports all LV supported browsers? It looks like there’s been a bunch of different headers that various browsers expect. With HTTP this is something that nginx would usually handle.
That opens a can of worms of needing to drag in both JS libs and have them play nice together. The trade off there are increasing your bundle size and also increasing the complexity. I’ve also seen Chris and others say to LV all the things (in the context of creating an app where it makes sense, like not needing offline support, etc.).
Per the link above, Safari supports x-webkit-deflate-frame. If you search for x-webkit-deflate-frame on Cowboy repository, you will see it explicitly checks for this header, alongside permessage-deflate.
Compression happens within the VM by calling zlib:gzip/1, which is a C binding to zlib, the lib used by most systems and apparently Nginx too. I actually like that compression is handled in Elixir because the data is compressed from beginning to end.
Lastly I’d like to take a moment to acknowledge how utterly awesome this community is… I mean really: I just posted a slightly tounge in cheek comment right before heading into the holidays and it ensues the most productive and civil discussion you could imagine - even with deep participation of the creators of the mentioned technology. This is incredible…
Despite all the technical bells and whistles of the platform: the community around Elixir is, for me, by far the biggest asset and best feature of the whole stack. Thank you all so much
OT
Is there a branch for this? I’d like to help with this if possible, since I have a usecase for this