aboutsummaryrefslogtreecommitdiff
path: root/deflate.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2024-07-01 19:24:01 -0500
committerMark Adler <madler@alumni.caltech.edu>2024-07-01 19:34:40 -0500
commite011d8c164402cbb1baf92533dfb4f933ec08fee (patch)
tree7a28431c3c5caf885f07deac6718787b36f2231c /deflate.h
parent534864bccd78812648ad1beaccdeec7c9d47aeef (diff)
downloadzlib-e011d8c164402cbb1baf92533dfb4f933ec08fee.tar.gz
zlib-e011d8c164402cbb1baf92533dfb4f933ec08fee.tar.bz2
zlib-e011d8c164402cbb1baf92533dfb4f933ec08fee.zip
Add deflateUsed() function to get the used bits in the last byte.
This returns the number of used bits in the last byte of a stream that has just been compressed with deflate.
Diffstat (limited to 'deflate.h')
-rw-r--r--deflate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/deflate.h b/deflate.h
index 300c6ad..4884a4b 100644
--- a/deflate.h
+++ b/deflate.h
@@ -271,6 +271,9 @@ typedef struct internal_state {
271 /* Number of valid bits in bi_buf. All bits above the last valid bit 271 /* Number of valid bits in bi_buf. All bits above the last valid bit
272 * are always zero. 272 * are always zero.
273 */ 273 */
274 int bi_used;
275 /* Last number of used bits when going to a byte boundary.
276 */
274 277
275 ulg high_water; 278 ulg high_water;
276 /* High water mark offset in window for initialized bytes -- bytes above 279 /* High water mark offset in window for initialized bytes -- bytes above