diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2024-07-01 19:24:01 -0500 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2024-07-01 19:34:40 -0500 |
commit | e011d8c164402cbb1baf92533dfb4f933ec08fee (patch) | |
tree | 7a28431c3c5caf885f07deac6718787b36f2231c /deflate.h | |
parent | 534864bccd78812648ad1beaccdeec7c9d47aeef (diff) | |
download | zlib-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |