flate

deflate implementation
git clone git://git.suckless.org/flate
Log | Files | Refs | README

commit 57331c5d215f6ca44c94c48b2cbd6ad302d46dc2
parent 56b46cef14ad54fd2cdc9be296c36530078a0992
Author: nsz@tpx <unknown>
Date:   Mon, 10 Aug 2009 15:22:13 +0200

todo update
Diffstat:
Makefile | 2+-
flate.h | 2+-
inflate.c | 10++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -4,7 +4,7 @@ LDFLAGS= SRC=inflate.c inflate_example.c inflate_simple.c inflate_callback.c \ deflate.c deflate_example.c OBJ=${SRC:.c=.o} -EXE=inflate inflate_simple deflate deflate_simple +EXE=inflate inflate_simple deflate all: ${EXE} inflate: inflate.o inflate_example.o diff --git a/flate.h b/flate.h @@ -9,7 +9,7 @@ enum { FlateIn = -2, FlateOut = -3 }; -/* TODO inflate assume Flate* < 0 */ +/* TODO inflate assumes Flate* < 0 */ typedef struct { int nin; diff --git a/inflate.c b/inflate.c @@ -2,6 +2,16 @@ #include <string.h> #include "flate.h" +/* +TODO: + error message + init globals + (rev lookup vs revinc) + (test/optimize uncompressed block) + read less than 7 bits in clen decode + bound checks in clen decode +*/ + enum { CodeBits = 16, /* max number of bits in a code + 1 */ LitlenTableBits = 9, /* litlen code bits used in lookup table */