/* window is a user-supplied window and output buffer that is 64K bytes.  */
int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window, const char *version, int stream_size)
/* window is a user-supplied window and output buffer that is 64K bytes.  */
int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window, const char *version, int stream_size)
{
    struct inflate_state FAR *state;
    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL || window == Z_NULL)
        return Z_STREAM_ERROR;
    strm->msg = Z_NULL;
    if (strm->zalloc == (alloc_func)0) {
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
    }
    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
                                               sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (voidpf)state;
    state->window = window;
    return Z_OK;
}