if (!dfltcc_can_inflate(strm)) return 0; if (dfltcc_was_inflate_used(strm)) /* DFLTCC has already decompressed some data. Since there is not * enough information to resume decompression in software, the call * must fail.
*/ return 1; /* DFLTCC was not used yet - decompress in software */
memset(&dfltcc_state->af, 0, sizeof(dfltcc_state->af)); return 0;
}
if (flush == Z_BLOCK || flush == Z_PACKET_FLUSH) { /* DFLTCC does not support stopping on block boundaries (Z_BLOCK flush option) * as well as the use of Z_PACKET_FLUSH option (used exclusively by PPP driver)
*/ if (dfltcc_inflate_disable(strm)) {
*ret = Z_STREAM_ERROR; return DFLTCC_INFLATE_BREAK;
} else return DFLTCC_INFLATE_SOFTWARE;
}
if (state->last) { if (state->bits != 0) {
strm->next_in++;
strm->avail_in--;
state->bits = 0;
}
state->mode = CHECK; return DFLTCC_INFLATE_CONTINUE;
}
if (strm->avail_in == 0 && !param->cf) return DFLTCC_INFLATE_BREAK;
/* Translate stream to parameter block */
param->cvt = CVT_ADLER32;
param->sbb = state->bits; if (param->hl)
param->nt = 0; /* Honor history for the first block */
param->cv = state->check;
/* Inflate */ do {
cc = dfltcc_xpnd(strm);
} while (cc == DFLTCC_CC_AGAIN);
/* Translate parameter block to stream */
strm->msg = oesc_msg(dfltcc_state->msg, param->oesc);
state->last = cc == DFLTCC_CC_OK;
state->bits = param->sbb;
state->check = param->cv; if (cc == DFLTCC_CC_OP2_CORRUPT && param->oesc != 0) { /* Report an error if stream is corrupted */
state->mode = BAD; return DFLTCC_INFLATE_CONTINUE;
}
state->mode = TYPEDO; /* Break if operands are exhausted, otherwise continue looping */ return (cc == DFLTCC_CC_OP1_TOO_SHORT || cc == DFLTCC_CC_OP2_TOO_SHORT) ?
DFLTCC_INFLATE_BREAK : DFLTCC_INFLATE_CONTINUE;
}
EXPORT_SYMBOL(dfltcc_inflate);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.