]> git.lizzy.rs Git - zlib.git/commitdiff
Add inflateCodesUsed() function for internal use.
authorMark Adler <madler@alumni.caltech.edu>
Mon, 29 Dec 2014 08:18:42 +0000 (00:18 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Mon, 29 Dec 2014 08:18:42 +0000 (00:18 -0800)
inflate.c

index 870f89bb4d3646684bf37e2144c4b83c808ab84d..68aa4c390829524057c3d44859041ae06528dc8a 100644 (file)
--- 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;
+}