out->outbuf = realloc(out->outbuf, out->outsize);
out->outbuf = srealloc(out->outbuf, out->outsize);
static void outbits(struct Outbuf *out, unsigned long bits, int nbits) {    assert(out->noutbits + nbits <= 32);    out->outbits |= bits << out->noutbits;    out->noutbits += nbits;    while (out->noutbits >= 8) {        if (out->outlen >= out->outsize) {            out->outsize = out->outlen + 64;            out->outbuf = realloc(out->outbuf, out->outsize);        }        out->outbuf[out->outlen++] = (unsigned char)(out->outbits & 0xFF);        out->outbits >>= 8;        out->noutbits -= 8;    }}