Huffman coding. Lossless data compression.
spago install huffmanDocumentation and more detailed examples are hosted on Pursuit.
import Data.Huffman.Codewords (composeCodewords)
import Data.Huffman.Encode (decodeWith, encodeWith)
str = "A strongly-typed functional programming language that compiles to JavaScript"codewords = composeCodewords str
>>> (
" : 00110000 00110000 00110001"
"-: 00110000 00110000 00110000 00110001 00110001 00110000"
"A: 00110000 00110000 00110000 00110001 00110001 00110001"
"J: 00110000 00110000 00110000 00110001 00110000 00110000"
"S: 00110000 00110000 00110000 00110001 00110000 00110001"
"a: 00110001 00110001 00110001 00110000"
...
)encoded = encodeWith str codewords
>>> 000111001000001111100011001011101001001001000011011111001001011101001101000...decoded = decodeWith encoded codewords
>>> "A strongly-typed functional programming language that compiles to JavaScript"To install dependencies:
yarn install
yarn spago installTo run tests:
yarn spago testTo generate the documentation locally:
yarn spago docsTo run linters:
yarn lintTo run formatters:
yarn formatPlease read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.
This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.
Bump2version is used to version and tag changes. For example:
bump2version patch- Joel Lefkowitz - Initial work
Lots of love to the open source community!