Giter Club home page Giter Club logo

hs-brotli's Introduction

🥦 Brotli compression for Haskell 🥦

Brotli is a compression format that can achieve higher compression ratios and compress faster than gzip and deflate. It is supported natively by all modern browsers.

This monorepo contains:

  • Primitive FFI bindings to Google's official C API
  • Higher level strict, lazy, and streaming compression and decompression interfaces.
  • Convenience wrappers for the popular Conduit, Pipes libraries
  • WAI middleware to quickly drop in support for Haskell web applications.

All of these projects are still alpha quality, so use at your own risk.

Installation

These libraries are not currently uploaded to Hackage, you can add them to your stack.yaml:

packages:
- location:
    git: https://github.com/iand675/brotli
    commit: PRESENT_COMMIT_HERE
  subdirs:
  - brotli
  - brotli-conduit
  - wai-middleware-brotli
  extra-dep: true

You will also need to install the C library >= 0.6 in a location where pkg-config can find it. You can run pkg-config --static --libs --cflags libbrotlienc to see if it's installed appropriately.

You can find the C library here.

Or install from your package manager:

Platform Installation Command
MacOS brew install brotli
Ubuntu Xenial apt-get install brotli

Roadmap

All of the base brotli package high level bindings are functional, but it's possible that error cases could presently cause memory leaks. Any contributions that find and/or fix these situations would be very welcome.

More documentation examples are always welcome.

streaming-brotli and pipes-brotli aren't really actually implemented yet.

It would be great to have benchmarks in place to compare compression performance with Haskell's gzip bindings.

Contributing

Please use hint and hindent on pull requests prior to opening them up. If fixing any bugs, please implement regression test cases.

If you have node installed locally, you can run npm install or yarn install to set up shared git hooks to to automate these validations.

Please respect and follow the Code of Conduct

hs-brotli's People

Contributors

iand675 avatar tjdett avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.