Skip to content

gsquire/compress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compress

Build Status

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

Example

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<Response> {
        Ok(Response::with((status::Ok, GzipWriter(b"Some compressed response"))))
    }

    Iron::new(hello_world).http("localhost:3000").unwrap();
}

License

MIT

About

Compression modifier for the Iron framework

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages