numcodecs_delta
numcodecs_delta
Delta codecs for the numcodecs buffer compression API.
Classes:
-
BinaryDeltaCodec–Codec to encode the data as the binary difference between adjacent values.
BinaryDeltaCodec
Bases: Codec
Codec to encode the data as the binary difference between adjacent values.
The encoded data has the same data type as the input, but its bits represent the binary difference between values. If the input data is floating point, these difference values may have weird values that are of little use arithmetically. Despite this weird representation, this codec is able to losslessly reconstruct all values.
It is recommended to only use lossless encodings after this codec.
Please refer to the numcodecs.delta.Delta codec
for a delta codec that computes the difference in the data type as the
input.
Methods:
encode
encode(buf: Buffer) -> Buffer
Encode the data in buf.
| Parameters: |
|
|---|
| Returns: |
|
|---|
decode
decode(buf: Buffer, out: None | Buffer = None) -> Buffer
Decode the data in buf.
| Parameters: |
|
|---|
| Returns: |
|
|---|