[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] libflate (DEFLATE decoding)
- Subject: Re: [PATCH] libflate (DEFLATE decoding)
- From: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Sat, 26 May 2018 15:01:45 -0700
- To: myrddin-dev@xxxxxxxxxxxxxx
- Cc: Quentin Carbonneaux <quentin@xxxxxx>
On Thu, 24 May 2018 20:20:21 +0000, Quentin Carbonneaux <quentin@xxxxxx> wrote:
> 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.
Yes. I'll probably be throwing a few files that other third
party implementations generate at it, and I will probably
add them as test cases.
> 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
Sure -- We can definitely expand on the implementation here,
but this seems to be working and useful.
> On the other hand, the current implementation is quite
> simple and appears to work.
The code quality is definitely good, at least. I'm happy to
merge it as is, after a bit more testing. The mini-language
for testing is quite nifty, too.
> Cheers,
>
--
Ori Bernstein