st = (struct LZ77InternalContext *)malloc(sizeof(*st));
st = (struct LZ77InternalContext *)smalloc(sizeof(*st));
static int lz77_init(struct LZ77Context *ctx) {    struct LZ77InternalContext *st;    int i;    st = (struct LZ77InternalContext *)malloc(sizeof(*st));    if (!st)	return 0;    ctx->ictx = st;    for (i = 0; i < WINSIZE; i++)	st->win[i].next = st->win[i].prev = st->win[i].hashval = INVALID;    for (i = 0; i < HASHMAX; i++)	st->hashtab[i].first = INVALID;    st->winpos = 0;    st->npending = 0;    return 1;}