Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gsquire/compress
Compression modifier for the Iron framework
https://github.com/gsquire/compress
iron rust
Last synced: 30 days ago
JSON representation
Compression modifier for the Iron framework
- Host: GitHub
- URL: https://github.com/gsquire/compress
- Owner: gsquire
- License: mit
- Created: 2015-05-13T22:22:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-04T01:02:44.000Z (almost 8 years ago)
- Last Synced: 2024-08-08T18:56:04.646Z (3 months ago)
- Topics: iron, rust
- Language: Rust
- Homepage: https://crates.io/crates/iron_compress
- Size: 7.81 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# compress
[![Build Status](https://travis-ci.org/gsquire/compress.svg?branch=master)](https://travis-ci.org/gsquire/compress)This small library exposes two types that know how to encode bytes based on the GZIP and deflate
algorithms. The types implement the modifier trait so they can be used in an Iron Response.### Documentation
Find it [here](https://docs.rs/iron_compress)### Example
```rust
extern crate iron;
extern crate iron_compress;use iron::prelude::*;
use iron::status;use iron_compress::GzipWriter;
fn main() {
fn hello_world(_: &mut Request) -> IronResult {
Ok(Response::with((status::Ok, GzipWriter(b"Some compressed response"))))
}Iron::new(hello_world).http("localhost:3000").unwrap();
}
```### License
MIT