hopfli: Bidings to Google's Zopfli compression library

[ apache, codec, library ] [ Propose Tags ]

Hopfli provides a pure interface to compress data using the Zopfli library algorithm.

[Skip to Readme]
Versions [faq],,,,
Change log CHANGELOG.md
Dependencies base (==4.*), bytestring (>=0.9 && <0.12), zlib (>=0.5.4 && <0.7) [details]
License Apache-2.0
Author Anantha Kumaran <ananthakumaran@gmail.com>
Maintainer Cristian Adrián Ontivero <cristianontivero@gmail.com>
Revised Revision 1 made by contivero at Mon Jan 15 10:45:16 UTC 2018
Category Codec
Home page https://github.com/ananthakumaran/hopfli
Bug tracker https://github.com/ananthakumaran/hopfli/issues
Source repo head: git clone https://github.com/ananthakumaran/hopfli
Uploaded by contivero at Sat Jun 17 21:14:15 UTC 2017
Distributions LTSHaskell:, NixOS:, Stackage:
Downloads 2860 total (81 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-06-17 [all 1 reports]




Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Readme for hopfli-

[back to package description]

Hopfli - Haskell bindings to the Zopfli library

Build Status Hackage-Deps Hackage License

Hopfli provides a pure interface to compress data using the Zopfli library.

Zopfli is a compression library released by Google in 2013, which can output either a raw DEFLATE stream, or one wrapped into zlib or gzip formats. Under default settings, the output produced by Zopfli is 3.7–8.3% smaller than that of gzip -9, though the algorithm is 81 times slower.

Zopfli is distributed under the Apache 2.0 license.


import           Codec.Compression.Hopfli
import           Data.ByteString
import           System.IO                (stdin, stdout)

main :: IO ()
main = hGetContents stdin >>= hPut stdout . compressWith defaultCompressOptions GZIP
runGhc example.hs < README.md > README.md.gz