https://github.com/ananthakumaran/hopfli
Haskell bindings for Zopfli Compression Algorithm
https://github.com/ananthakumaran/hopfli
haskell zopfli
Last synced: 11 months ago
JSON representation
Haskell bindings for Zopfli Compression Algorithm
- Host: GitHub
- URL: https://github.com/ananthakumaran/hopfli
- Owner: ananthakumaran
- License: apache-2.0
- Created: 2014-02-08T11:01:31.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-03-31T11:33:30.000Z (about 3 years ago)
- Last Synced: 2025-06-25T10:35:49.096Z (12 months ago)
- Topics: haskell, zopfli
- Language: Haskell
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Hopfli - Haskell bindings to the Zopfli library
===
[](https://travis-ci.org/ananthakumaran/hopfli.svg?branch=master)
[](http://packdeps.haskellers.com/specific?package=hopfli)
[](https://hackage.haskell.org/package/hopfli)
[](https://opensource.org/licenses/Apache-2.0)
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
````haskell
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
````