For anyone that wants to try out very experimental automatic gzip encoding in Play 2.1, I've implemented a filter in this project:
You can use it by adding the following dependency to your project:
"com.typesafe.play.extras" %% "iteratees-extras" % "1.0.1"
And then if your project is a Scala project, add the filter to your Global object like this:
object Global extends WithFilters(new GzipFilter()) {
...
}
Or if it's a Java project, add the filter to your Global object like this:
public class Global extends GlobalSettings {
public <T extends play.api.mvc.EssentialFilter> Class<T>[] filters() {
return new Class[] { GzipFilter.class };
}
}
From:https://groups.google.com/forum/?fromgroups#!topic/play-framework/ef96hb4BueA