[FFmpeg-devel] zlib decoder
Måns Rullgård
mans
Tue Jul 3 23:40:34 CEST 2007
Michael Niedermayer <michaelni at gmx.at> writes:
> Hi
>
> On Mon, Jul 02, 2007 at 10:30:16PM +0100, M?ns Rullg?rd wrote:
>> Here, at long last, is my highly anticipated zlib decoder.
>>
>> It decompresses a random choice of gzip files I've tried it on
>> correctly. I'm sure there still are corner cases I haven't covered,
>> though. Any help finding, and better yet fixing, these is
>> appreciated.
>>
>> Speedwise it's on par with gunzip, with large buffer sizes even a bit
>> faster.
> [...]
>> static const unsigned int len_tab[29][2] = {
[...]
>> static const unsigned int dist_tab[32][2] = {
[...]
> this fit in short
Yes, it does.
> are all thouse macros really needed?
> cant this be implemented in a more readable way?
Some could probably be made into functions. Every place that reads
bits needs to be reachable from the switch statement though. I moved
the huffman code parsing out of the main loop to make that part easier
to read.
Do you see any real bugs? Optimisations? API comments?
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list