From 5370d99a2affe0b040550cffbc0ba8fa790594b3 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Mon, 29 Dec 2014 00:18:42 -0800 Subject: [PATCH] Add inflateCodesUsed() function for internal use. --- inflate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inflate.c b/inflate.c index 870f89b..68aa4c3 100644 --- a/inflate.c +++ b/inflate.c @@ -1510,3 +1510,12 @@ z_streamp strm; (state->mode == COPY ? state->length : (state->mode == MATCH ? state->was - state->length : 0)); } + +unsigned long ZEXPORT inflateCodesUsed(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + if (strm == Z_NULL || strm->state == Z_NULL) return -1L; + state = (struct inflate_state FAR *)strm->state; + return state->next - state->codes; +}