public interface DataCodec
DataCodecs transform one ReadData into another,
for example, compressing it.| Modifier and Type | Method and Description |
|---|---|
static DataCodec |
concatenate(DataCodec... codecs)
Create a
DataCodec that sequentially applies codecs in
the given order for encoding, and in reverse order for decoding. |
static DataCodec |
create(DataCodecInfo... codecInfos) |
ReadData |
decode(ReadData readData)
Decode the given
ReadData. |
ReadData |
encode(ReadData readData)
Encode the given
ReadData. |
ReadData decode(ReadData readData) throws N5Exception.N5IOException
ReadData.
The returned decoded ReadData reports length()== decodedLength. Decoding may be lazy or eager,
depending on the DataCodec implementation.
readData - data to decodeN5Exception.N5IOException - if any I/O error occursReadData encode(ReadData readData) throws N5Exception.N5IOException
ReadData.
Encoding may be lazy or eager, depending on the DataCodec
implementation.
readData - data to encodeN5Exception.N5IOException - if any I/O error occursstatic DataCodec concatenate(DataCodec... codecs)
DataCodec that sequentially applies codecs in
the given order for encoding, and in reverse order for decoding.
If all codecs implement DeterministicSizeDataCodec, the
returned DataCodec will also be a DeterministicSizeDataCodec.
codecs - a list of DataCodecsstatic DataCodec create(DataCodecInfo... codecInfos)
Copyright © 2017–2026 Saalfeld Lab. All rights reserved.