The hopfli package

[Tags:apache, library, test]

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

[Skip to Readme]


Dependencies base (==4.*), bytestring (>=0.9 && <0.12), zlib (>=0.5.4 && <0.7) [details]
License Apache-2.0
Author Anantha Kumaran <>
Maintainer Cristian Adrián Ontivero <>
Category Codec
Home page
Bug tracker
Source repository head: git clone
Uploaded Thu Mar 2 15:19:02 UTC 2017 by contivero
Distributions LTSHaskell:, NixOS:, Stackage:, Tumbleweed:
Downloads 932 total (17 in the last 30 days)
0 []
Status Docs available [build log]
Last success reported on 2017-03-02 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for hopfli

Readme for hopfli-

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.


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 < >