/play-brotli-filter

Brotli filter for the playframework

Primary LanguageScalaApache License 2.0Apache-2.0

Brotli filter for play

License

Install

Add as a dependency:

  • Play 3.0 use play-v30-brotli-filter

    libraryDependencies += "com.gu" %% "play-v30-brotli-filter" % "[latest version number]"
  • Play 2.9 use play-v29-brotli-filter

    libraryDependencies += "com.gu" %% "play-v29-brotli-filter" % "[latest version number]"
  • Play 2.8 use play-v28-brotli-filter

    libraryDependencies += "com.gu" %% "play-v28-brotli-filter" % "[latest version number]"
  • Akka use akka-stream-brotli

    libraryDependencies += "com.gu" %% "akka-stream-brotli" % "[latest version number]"
  • Pekko use pekko-stream-brotli

    libraryDependencies += "com.gu" %% "pekko-stream-brotli" % "[latest version number]"

Configure

Currently the only parameter you can configure is quality, which defaults to 11.

play.filters {

  # Brotli filter configuration
  brotli {

    # The compression-speed vs compression-density tradeoffs. The higher the quality, the slower the compression. Range is 0 to 11
    quality = 11

  }
}