PhoenixBakery - better compression for Pheonix 1.6 assets
PhoenixBakery is library for Phoenix 1.6 (and later) that provides modules implementing Phoenix.Digester.Compressor
. There are currently 3 modules:
-
PhoenixBakery.Gzip
that replaces defaultPhoenix.Digester.Gzip
with stronger compression at cost of run time and memory usage. But as it is one-time action (for each release) it is IMHO better to use that build time for less transfer used later -
PhoenixBakery.Brotli
that provides support for Brotli algorithm designed by Google and currently supported in all modern browsers. It provides better compression thatgzip
and moderate decompression speed. -
PhoenixBakery.Zstd
that provides support for Zstandard algorithm designed by Facebook. While it is not supported by any browser (AFAIK), the support may rollout in near future. It provides slightly worse compression ratio than Brotli, but provides better decompression times.
Read next Under the Hood of Macros in Elixir