http-rs / http-types

Common types for HTTP operations
https://docs.rs/http-types
Apache License 2.0
200 stars 83 forks source link

Add `Mime::is_compressible` method #273

Open yoshuawuyts opened 3 years ago

yoshuawuyts commented 3 years ago

Tracking issue: #274

When https://github.com/http-rs/http-types/issues/272 implemented we should add the Mime::is_compressible method which can inform which mime types make sense to compress. This is great for negotiating compression in static file servers, as some formats are already compressed when sending over the wire, and applying another round of compression is only going to cost performance.