32-bit checksums¶
CRC32¶
- class numcodecs.checksum32.CRC32[source]¶
- codec_id = 'crc32'¶
Codec identifier.
- encode(buf)¶
Encode data in buf.
- Parameters
- bufbuffer-like
Data to be encoded. May be any object supporting the new-style buffer protocol.
- Returns
- encbuffer-like
Encoded data. May be any object supporting the new-style buffer protocol.
- decode(buf, out=None)¶
Decode data in buf.
- Parameters
- bufbuffer-like
Encoded data. May be any object supporting the new-style buffer protocol.
- outbuffer-like, optional
Writeable buffer to store decoded data. N.B. if provided, this buffer must be exactly the right size to store the decoded data.
- Returns
- decbuffer-like
Decoded data. May be any object supporting the new-style buffer protocol.
- get_config()¶
Return a dictionary holding configuration parameters for this codec. Must include an ‘id’ field with the codec identifier. All values must be compatible with JSON encoding.
- classmethod from_config(config)¶
Instantiate codec from a configuration object.
Adler32¶
- class numcodecs.checksum32.Adler32[source]¶
- codec_id = 'adler32'¶
Codec identifier.
- encode(buf)¶
Encode data in buf.
- Parameters
- bufbuffer-like
Data to be encoded. May be any object supporting the new-style buffer protocol.
- Returns
- encbuffer-like
Encoded data. May be any object supporting the new-style buffer protocol.
- decode(buf, out=None)¶
Decode data in buf.
- Parameters
- bufbuffer-like
Encoded data. May be any object supporting the new-style buffer protocol.
- outbuffer-like, optional
Writeable buffer to store decoded data. N.B. if provided, this buffer must be exactly the right size to store the decoded data.
- Returns
- decbuffer-like
Decoded data. May be any object supporting the new-style buffer protocol.
- get_config()¶
Return a dictionary holding configuration parameters for this codec. Must include an ‘id’ field with the codec identifier. All values must be compatible with JSON encoding.
- classmethod from_config(config)¶
Instantiate codec from a configuration object.