Package org.rcsb.cif.binary.encoding
Class DeltaEncoding<T extends SignedIntArray<?>>
java.lang.Object
org.rcsb.cif.binary.encoding.DeltaEncoding<T>
- All Implemented Interfaces:
Encoding<T,T>
public class DeltaEncoding<T extends SignedIntArray<?>> extends Object implements Encoding<T,T>
Stores the input integer array as an array of consecutive differences.
Delta {
kind = "Delta"
origin: number
srcType: int[]
}
-
Constructor Summary
Constructors Constructor Description DeltaEncoding()DeltaEncoding(int origin, int srcType) -
Method Summary
-
Constructor Details
-
DeltaEncoding
public DeltaEncoding() -
DeltaEncoding
public DeltaEncoding(int origin, int srcType)
-
-
Method Details
-
getMapRepresentation
Description copied from interface:EncodingConverts this encoding to its map representation that can be serialized as BinaryCif.- Specified by:
getMapRepresentationin interfaceEncoding<T extends SignedIntArray<?>,T extends SignedIntArray<?>>- Returns:
- a Map that contains all encoding information
-
decode
Description copied from interface:EncodingMove one step up the encoding deque. One step closer to the original representation of the data.- Specified by:
decodein interfaceEncoding<T extends SignedIntArray<?>,T extends SignedIntArray<?>>- Parameters:
data- the container to decode- Returns:
- the decoded information
-
encode
Description copied from interface:EncodingMove one step down the encoding deque. One step closer to aByteArrayrepresentation.- Specified by:
encodein interfaceEncoding<T extends SignedIntArray<?>,T extends SignedIntArray<?>>- Parameters:
data- the container to encode- Returns:
- the decoded information
-
toString
-