diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2019-04-05 15:27:47 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2019-04-05 15:27:47 -0700 |
commit | 0e96d8e7c7079ab9f07cc7b57ae3ca9de8c80742 (patch) | |
tree | bac8a70768ed7c3510dc02c1a0ee4a6a484446ef | |
parent | deb44b57429b05d4ad5b4f793c969e58a9328f06 (diff) | |
download | zlib-0e96d8e7c7079ab9f07cc7b57ae3ca9de8c80742.tar.gz zlib-0e96d8e7c7079ab9f07cc7b57ae3ca9de8c80742.tar.bz2 zlib-0e96d8e7c7079ab9f07cc7b57ae3ca9de8c80742.zip |
Explicitly note that the 32-bit check values are 32 bits.
-rw-r--r-- | zlib.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1690,8 +1690,9 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); | |||
1690 | ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); | 1690 | ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); |
1691 | /* | 1691 | /* |
1692 | Update a running Adler-32 checksum with the bytes buf[0..len-1] and | 1692 | Update a running Adler-32 checksum with the bytes buf[0..len-1] and |
1693 | return the updated checksum. If buf is Z_NULL, this function returns the | 1693 | return the updated checksum. An Adler-32 value is in the range of a 32-bit |
1694 | required initial value for the checksum. | 1694 | unsigned integer. If buf is Z_NULL, this function returns the required |
1695 | initial value for the checksum. | ||
1695 | 1696 | ||
1696 | An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed | 1697 | An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed |
1697 | much faster. | 1698 | much faster. |
@@ -1727,9 +1728,10 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, | |||
1727 | ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); | 1728 | ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); |
1728 | /* | 1729 | /* |
1729 | Update a running CRC-32 with the bytes buf[0..len-1] and return the | 1730 | Update a running CRC-32 with the bytes buf[0..len-1] and return the |
1730 | updated CRC-32. If buf is Z_NULL, this function returns the required | 1731 | updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. |
1731 | initial value for the crc. Pre- and post-conditioning (one's complement) is | 1732 | If buf is Z_NULL, this function returns the required initial value for the |
1732 | performed within this function so it shouldn't be done by the application. | 1733 | crc. Pre- and post-conditioning (one's complement) is performed within this |
1734 | function so it shouldn't be done by the application. | ||
1733 | 1735 | ||
1734 | Usage example: | 1736 | Usage example: |
1735 | 1737 | ||