Skip to content

Commit 237eb72

Browse files
committed
docstrings
1 parent 34dc1a3 commit 237eb72

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

numcodecs/checksum32.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,45 @@ def decode(self, buf, out=None):
6060

6161

6262
class CRC32(Checksum32):
63+
"""Codec add a crc32 checksum to the buffer.
64+
65+
Parameters
66+
----------
67+
location : 'start' or 'end'
68+
Where to place the checksum in the buffer.
69+
"""
70+
6371
codec_id = 'crc32'
6472
checksum = zlib.crc32
73+
location = 'start'
6574

6675

6776
class CRC32C(Checksum32):
77+
"""Codec add a crc32c checksum to the buffer.
78+
79+
Parameters
80+
----------
81+
location : 'start' or 'end'
82+
Where to place the checksum in the buffer.
83+
"""
84+
6885
codec_id = 'crc32c'
6986
checksum = crc32c_
7087
location = 'end'
7188

7289

7390
class Adler32(Checksum32):
91+
"""Codec add a adler32 checksum to the buffer.
92+
93+
Parameters
94+
----------
95+
location : 'start' or 'end'
96+
Where to place the checksum in the buffer.
97+
"""
98+
7499
codec_id = 'adler32'
75100
checksum = zlib.adler32
101+
location = 'start'
76102

77103

78104
class JenkinsLookup3(Checksum32):
@@ -86,9 +112,12 @@ class JenkinsLookup3(Checksum32):
86112
the data portion and compared with the four-byte checksum, raising
87113
RuntimeError if inconsistent.
88114
89-
Attributes:
90-
initval: initial seed passed to the hash algorithm, default: 0
91-
prefix: bytes prepended to the buffer before evaluating the hash, default: None
115+
Parameters
116+
----------
117+
initval : int
118+
initial seed passed to the hash algorithm, default: 0
119+
prefix : int
120+
bytes prepended to the buffer before evaluating the hash, default: None
92121
"""
93122

94123
checksum = jenkins_lookup3

0 commit comments

Comments
 (0)