summaryrefslogtreecommitdiff
path: root/zlib-ng.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2019-04-05 15:27:47 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2021-02-03 12:41:32 +0100
commit47faede6447f444f77ac931d3c9a39cc4f091c72 (patch)
tree9f4a07882575149b4453ee8360f06deab7252af6 /zlib-ng.h
parent9e9bd3b058ecbf8b7f388131e96f60fe9f58e864 (diff)
Explicitly note that the 32-bit check values are 32 bits.
Diffstat (limited to 'zlib-ng.h')
-rw-r--r--zlib-ng.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/zlib-ng.h b/zlib-ng.h
index 7f109ed..7412f54 100644
--- a/zlib-ng.h
+++ b/zlib-ng.h
@@ -1691,8 +1691,9 @@ Z_EXTERN Z_EXPORT
uint32_t zng_adler32(uint32_t adler, const uint8_t *buf, uint32_t len);
/*
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns the
- required initial value for the checksum.
+ return the updated checksum. An Adler-32 value is in the range of a 32-bit
+ unsigned integer. If buf is Z_NULL, this function returns the required
+ initial value for the checksum.
An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
much faster.
@@ -1728,9 +1729,10 @@ Z_EXTERN Z_EXPORT
uint32_t zng_crc32(uint32_t crc, const uint8_t *buf, uint32_t len);
/*
Update a running CRC-32 with the bytes buf[0..len-1] and return the
- updated CRC-32. If buf is NULL, this function returns the required
- initial value for the crc. Pre- and post-conditioning (one's complement) is
- performed within this function so it shouldn't be done by the application.
+ updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
+ If buf is Z_NULL, this function returns the required initial value for the
+ crc. Pre- and post-conditioning (one's complement) is performed within this
+ function so it shouldn't be done by the application.
Usage example: