state->next_cursor[0] = state->next_cursor[1] = 0;
state->next_cursor[0] = state->next_cursor[1] = 1;
XPT_NewXDRState(XPTMode mode, char *data, uint32 len){    XPTState *state;    state = PR_NEW(XPTState);    if (!state)        return NULL;    state->mode = mode;    state->pool = PR_NEW(XPTDatapool);    state->next_cursor[0] = state->next_cursor[1] = 0;    if (!state->pool)        goto err_free_state;    state->pool->count = 0;    state->pool->offset_map = PL_NewHashTable(32, null_hash, PL_CompareValues,                                              PL_CompareValues, NULL, NULL);    if (!state->pool->offset_map)        goto err_free_pool;    if (mode == XPT_DECODE) {        state->pool->data = data;        state->pool->allocated = len;    } else {        state->pool->data = PR_MALLOC(XPT_GROW_CHUNK);        if (!state->pool->data)            goto err_free_hash;        state->pool->allocated = XPT_GROW_CHUNK;    }    return state; err_free_hash:    PL_HashTableDestroy(state->pool->offset_map); err_free_pool:    PR_DELETE(state->pool); err_free_state:    PR_DELETE(state);    return NULL;}