commit 180021497c5184b5eb3f713cb907266ac3407b46
parent 97aea87082581ee94005fb302dc28db3dca92083
Author: nsz <nszabolcs@gmail.com>
Date: Thu, 4 Jun 2009 13:39:15 +0200
inflate: comment fixes
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/inflate.c b/inflate.c
@@ -6,7 +6,7 @@ typedef unsigned short ushort;
typedef unsigned int uint;
enum {
- CodeBits = 16, /* max number of bits in a code */
+ CodeBits = 16, /* max number of bits in a code + 1 */
LitlenTableBits = 9, /* litlen code bits used in lookup table */
DistTableBits = 6, /* dist code bits used in lookup table */
ClenTableBits = 6, /* clen code bits used in lookup table */
@@ -273,7 +273,7 @@ static uint decode_symbol(Stream *s, Huff *huff) {
uint mask = (1 << huffbits) - 1;
Entry entry;
- /* get enough bite efficiently */
+ /* get enough bits efficiently */
if (streambits < huffbits) {
if (s->src + 2 < s->srcend) {
/* we assume huffbits <= 9 */
@@ -284,7 +284,7 @@ static uint decode_symbol(Stream *s, Huff *huff) {
bits |= *s->src++ << streambits;
streambits += 8;
} else
- /* rare case, we assume EOB length >= huffbits */
+ /* TODO: here we assume EOB length >= huffbits */
do {
if (!checksrc(s))
return 0;