@hackage hopfli0.2.2.1
Bidings to Google's Zopfli compression library
Categories
License
Apache-2.0
Maintainer
Cristian Adrián Ontivero <cristianontivero@gmail.com>
Links
Versions
Installation
Dependencies (3)
- base >=4 && <5
- bytestring >=0.9 && <0.12
- zlib >=0.5.4 && <0.7 Show all…
Dependents (3)
@hackage/acme-everything, @hackage/hasmin, @hackage/webify
Hopfli - Haskell bindings to the Zopfli library
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.
Example
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