No description
Find a file
flywind 732a045bf9 init
2020-05-10 22:18:00 +08:00
src init 2020-05-10 22:18:00 +08:00
tests init 2020-05-10 22:18:00 +08:00
huffman.nimble init 2020-05-10 22:18:00 +08:00
LICENSE Initial commit 2020-05-10 22:14:58 +08:00
README.md init 2020-05-10 22:18:00 +08:00

huffman

Huffman encode/decode for Nim.

API: huffman

import huffman

proc readHuffman

Encodes data.

proc readHuffman(s: Stream): string {.inline, raises: [Defect, IOError, OSError], tags: [ReadIOEffect].}

proc readHuffman

Encodes data.

proc readHuffman(s: string = "input.txt"): string {.inline, raises: [Defect, IOError, OSError], tags: [ReadIOEffect].}

proc huffman

Decodes data.

proc huffman(text: string; path = "output.txt") {.inline, raises: [KeyError, Defect, IOError, OSError, Exception], tags: [WriteIOEffect].}