@@ -31,22 +31,19 @@ The available exception and functions in this module are:
3131.. function :: adler32(data[, value])
3232
3333 Computes an Adler-32 checksum of *data *. (An Adler-32 checksum is almost as
34- reliable as a CRC32 but can be computed much more quickly.) If *value * is
35- present, it is used as the starting value of the checksum; otherwise, a fixed
36- default value is used. This allows computing a running checksum over the
34+ reliable as a CRC32 but can be computed much more quickly.) The result
35+ is an unsigned 32-bit integer. If *value * is present, it is used as
36+ the starting value of the checksum; otherwise, a default value of 1
37+ is used. Passing in *value * allows computing a running checksum over the
3738 concatenation of several inputs. The algorithm is not cryptographically
3839 strong, and should not be used for authentication or digital signatures. Since
3940 the algorithm is designed for use as a checksum algorithm, it is not suitable
4041 for use as a general hash algorithm.
4142
42- Always returns an unsigned 32-bit integer.
43-
44- .. note ::
45- To generate the same numeric value across all Python versions and
46- platforms use adler32(data) & 0xffffffff. If you are only using
47- the checksum in packed binary format this is not necessary as the
48- return value is the correct 32bit binary representation
49- regardless of sign.
43+ .. versionchanged :: 3.0
44+ Always returns an unsigned value.
45+ To generate the same numeric value across all Python versions and
46+ platforms, use ``adler32(data) & 0xffffffff ``.
5047
5148
5249.. function :: compress(data[, level])
@@ -97,23 +94,19 @@ The available exception and functions in this module are:
9794 single: Cyclic Redundancy Check
9895 single: checksum; Cyclic Redundancy Check
9996
100- Computes a CRC (Cyclic Redundancy Check) checksum of *data *. If *value * is
101- present, it is used as the starting value of the checksum; otherwise, a fixed
102- default value is used. This allows computing a running checksum over the
97+ Computes a CRC (Cyclic Redundancy Check) checksum of *data *. The
98+ result is an unsigned 32-bit integer. If *value * is present, it is used
99+ as the starting value of the checksum; otherwise, a default value of 0
100+ is used. Passing in *value * allows computing a running checksum over the
103101 concatenation of several inputs. The algorithm is not cryptographically
104102 strong, and should not be used for authentication or digital signatures. Since
105103 the algorithm is designed for use as a checksum algorithm, it is not suitable
106104 for use as a general hash algorithm.
107105
108- Always returns an unsigned 32-bit integer.
109-
110- .. note ::
111-
106+ .. versionchanged :: 3.0
107+ Always returns an unsigned value.
112108 To generate the same numeric value across all Python versions and
113- platforms, use ``crc32(data) & 0xffffffff ``. If you are only using
114- the checksum in packed binary format this is not necessary as the
115- return value is the correct 32-bit binary representation
116- regardless of sign.
109+ platforms, use ``crc32(data) & 0xffffffff ``.
117110
118111
119112.. function :: decompress(data[, wbits[, bufsize]])
0 commit comments