flate

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

commit b64c42f158913ffd87ecea868f0d8eb23c87b8b4
parent b2ae9edbde9f8ec614f3a62029c49271cdd06c21
Author: nsz@tpx <unknown>
Date:   Wed,  5 Aug 2009 21:07:49 +0200

inflate simple: read stdin only
Diffstat:
inflate_simple.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inflate_simple.c b/inflate_simple.c @@ -286,11 +286,11 @@ void *readall(FILE *in) { return buf; } -int main(int argc, char **argv) { +int main(void) { uint len = 1 << 24; uchar *src, *dst; - src = readall(argc < 2 ? stdin : fopen(argv[1], "r")); + src = readall(stdin); dst = malloc(len); len = (uchar *)inflate(dst, src) - dst; fprintf(stderr, "decompressed %u bytes\n", len);