Re: cleaner/better zlib sources?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Er, it's a little hard to see, but zlib spends the bulk of its time
in inflate_fast().  This is the fast path, invoked as long as there's
at least 6 bytes of input and 258 bytes of output space available.

The code in inflate.c just handles the last few bytes when near
one limit or the other.  Are you sure it's a performance problem?


There's equivalent inflate code in the PGP 5.0i distribution
(src/lib/pgp/compress/pgpZInflate.c) that's in the public domain AFAICT
(it says "Not copyrighted", and "You can do whatever you like with this
source file, though I would prefer that if you modify it and redistribute
it that you include comments to that effect with your name and the
date."), and uses switch statements only for resuming after a pause.

It's presumably well tested, but it's got a strong nasty-old-MSDOS
code smell about it, some truly bizarre indenting (don't look at lines
1118-1126 with a full stomach), and would require a lot of massaging to
integrate with zlib.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]