hauleth
Phoenix 1.6+ will support using additional compressors alongside Zlib one. This one is pretty handy, as it will allow using Brotli and any other compression method that may come in future. To achieve that I needed to revive one library and create another.
Revived library is erl-brotli:
https://github.com/hauleth/erl-brotli
New features include:
- streaming API for encoding
- API for decoding
- almost complete rewrite of the code
- extensive testing, together with property tests
I have contacted autor of that library whether they are willing to pass the Hex repository to me as I would prefer to not need create additional name for it. I haven’t heard anything back yet.
Second library is Phoenix.Digester.Compressor implementation that can use above library, however do not require it, and will gracefully fallback to CLI utility:
https://github.com/hauleth/phoenix_brotli_compressor
Again, not on Hex yet, as I need to have above library handled first.
This will allow user to just add this line in config/config.exs:
config :phoenix,
static_compressors: [Phoenix.Digester.Gzip, PhoenixBrotliCompressor]
Together with adding:
plug Plug.Static,
brotli: true,
# …
In their endpoint and now be happy user of the better compression thanks to Brotli.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
hauleth
This library became deprecated in favour of
phoenix_bakerywhich provides the same features + better GZIP and Zstandardderpycoder
I love it, thanks @hauleth.