struct zlib_table *tab = malloc(sizeof(struct zlib_table));
struct zlib_table *tab = smalloc(sizeof(struct zlib_table));
static struct zlib_table *zlib_mkonetab(int *codes, unsigned char *lengths,                                        int nsyms,                                        int pfx, int pfxbits, int bits) {    struct zlib_table *tab = malloc(sizeof(struct zlib_table));    int pfxmask = (1 << pfxbits) - 1;    int nbits, i, j, code;    tab->table = malloc((1 << bits) * sizeof(struct zlib_tableentry));    tab->mask = (1 << bits) - 1;    for (code = 0; code <= tab->mask; code++) {        tab->table[code].code = -1;        tab->table[code].nbits = 0;        tab->table[code].nexttable = NULL;    }    for (i = 0; i < nsyms; i++) {        if (lengths[i] <= pfxbits || (codes[i] & pfxmask) != pfx)            continue;        code = (codes[i] >> pfxbits) & tab->mask;        for (j = code; j <= tab->mask; j += 1 << (lengths[i]-pfxbits)) {            tab->table[j].code = i;            nbits = lengths[i] - pfxbits;            if (tab->table[j].nbits < nbits)                tab->table[j].nbits = nbits;        }    }    for (code = 0; code <= tab->mask; code++) {        if (tab->table[code].nbits <= bits)            continue;        /* Generate a subtable. */        tab->table[code].code = -1;        nbits = tab->table[code].nbits - bits;        if (nbits > 7)            nbits = 7;        tab->table[code].nbits = bits;        tab->table[code].nexttable = zlib_mkonetab(codes, lengths, nsyms,                                                   pfx | (code << pfxbits),                                                   pfxbits + bits, nbits);    }    return tab;}