diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2018-05-24 20:20:21 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2018-05-31 00:30:30 -0700 |
commit | 05764878243785d7bae1dda067d86eb9bcaec443 (patch) | |
tree | 459b55860c7912cf496f54d20e35290cd996b8de /lib/bld.sub | |
parent | e4e8fa6f7760221f843a924f058d11b58041db64 (diff) | |
download | mc-05764878243785d7bae1dda067d86eb9bcaec443.tar.gz |
libflate (DEFLATE decoding)
Hi,
As an official summer of cod entry, here is a start for
the libflate library, which will eventually contain
Myrddin's [de]compression equipment.
It currently exposes a single function
const decode : (outf : bio.file#, inf : bio.file# -> std.result(void, err))
that decodes a DEFLATE stream in the inf file into the
outf file. The function guarantees that it will not read
more than necessary from inf to either, figure out that
the stream is bogus, or fully uncompress the stream.
I did my due diligence with respect to testing but I am
not fully confident about the correctness of the
implementation; feel free to add more tests, or test it
on example files.
I wish:
- it was fast (don't expect gunzip's speed)
- it was better tested
- it had stricter format checks (e.g., checking for
invalid Huffman codes)
- I had implemented zlib/gzip decompression
On the other hand, the current implementation is quite
simple and appears to work.
Cheers,
-- q
Diffstat (limited to 'lib/bld.sub')
-rw-r--r-- | lib/bld.sub | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bld.sub b/lib/bld.sub index 8bcceb8..bc9c5f4 100644 --- a/lib/bld.sub +++ b/lib/bld.sub @@ -4,6 +4,7 @@ sub = date escfmt fileutil + flate http inifile iter |