From c34c1fcbb19852ca35216ad66276f4f86af3fc22 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:20:15 -0700 Subject: zlib 1.1.2 --- maketree.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 maketree.c (limited to 'maketree.c') diff --git a/maketree.c b/maketree.c new file mode 100644 index 0000000..66dd828 --- /dev/null +++ b/maketree.c @@ -0,0 +1,119 @@ +/* maketree.c -- make inffixed.h table for decoding fixed codes + * Copyright (C) 1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* This program is included in the distribution for completeness. + You do not need to compile or run this program since inffixed.h + is already included in the distribution. To use this program + you need to compile zlib with BUILDFIXED defined and then compile + and link this program with the zlib library. Then the output of + this program can be piped to inffixed.h. */ + +#include +#include +#include "zutil.h" +#include "inftrees.h" + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* showtree is only used for debugging purposes */ +void showtree(uInt b, inflate_huft *t, int d) +{ + int i, e; + char p[2*d+1]; + + for (i = 0; i < 2*d; i++) + p[i] = ' '; + p[i] = 0; + printf("%s[%d]\n", p, 1<