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. --- os400/bndsrc | 6 ++++++ os400/zlib.inc | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'os400') diff --git a/os400/bndsrc b/os400/bndsrc index 9f92bb1..187fb69 100644 --- a/os400/bndsrc +++ b/os400/bndsrc @@ -124,4 +124,10 @@ STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') EXPORT SYMBOL("crc32_combine_gen") EXPORT SYMBOL("crc32_combine_op") +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.3.2 additional entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + + EXPORT SYMBOL("deflateUsed") + ENDPGMEXP diff --git a/os400/zlib.inc b/os400/zlib.inc index 36db89e..e9352fe 100644 --- a/os400/zlib.inc +++ b/os400/zlib.inc @@ -371,6 +371,10 @@ D pending 10U 0 Pending bytes D bits 10I 0 Pending bits * + D deflateUsed PR 10I 0 extproc('deflateUsed') Get used bits + D strm like(z_stream) Compression stream + D bits 10I 0 Used bits + * D deflatePrime PR 10I 0 extproc('deflatePrime') Change level & strat D strm like(z_stream) Compression stream D bits 10I 0 value # of bits to insert -- cgit v1.2.3-55-g6feb