From e011d8c164402cbb1baf92533dfb4f933ec08fee Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Mon, 1 Jul 2024 19:24:01 -0500 Subject: 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. --- deflate.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'deflate.h') 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 { /* Number of valid bits in bi_buf. All bits above the last valid bit * are always zero. */ + int bi_used; + /* Last number of used bits when going to a byte boundary. + */ ulg high_water; /* High water mark offset in window for initialized bytes -- bytes above -- cgit v1.2.3-55-g6feb