]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Explicitly note that the 32-bit check values are 32 bits.
authorMark Adler <madler@alumni.caltech.edu>
Fri, 5 Apr 2019 22:27:47 +0000 (15:27 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 3 Feb 2021 11:41:32 +0000 (12:41 +0100)
zlib-ng.h
zlib.h

index 7f109ede830115c19b6b8b3c87180435c25c61a0..7412f54e73c10b22e44346e92e351245613fa68e 100644 (file)
--- 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:
 
diff --git a/zlib.h b/zlib.h
index 1650727e178851a215f070e031534f8227eed35d..d456a556e481ba18e721c920144ded2036800304 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -1650,8 +1650,9 @@ Z_EXTERN void Z_EXPORT gzclearerr(gzFile file);
 Z_EXTERN unsigned long Z_EXPORT adler32(unsigned long adler, const unsigned char *buf, unsigned int 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.
@@ -1685,9 +1686,10 @@ Z_EXTERN unsigned long Z_EXPORT adler32_combine(unsigned long adler1, unsigned l
 Z_EXTERN unsigned long Z_EXPORT crc32(unsigned long crc, const unsigned char *buf, unsigned int 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: