MSNumpressFSharp


Encode

Namespace: MSNumpressFSharp

Functions and values

Function or valueDescription
encodeLinear (...)
Signature: (data:double [] * dataSize:int * result:byte [] * fixedPoint:double) -> int

Encodes data using MS Numpress linear prediction compression. "data" is the array of doubles to be encoded. "dataSize" is the number of doubles in data to be encoded. "result" is the array where resulting bytes should be stored. "fixedPoint" is the the scaling factor used for getting the fixed point representation. This is stored in the binary and automatically extracted on decoding. Returns the number of encoded bytes.

encodePic (data, dataSize, result)
Signature: (data:double [] * dataSize:int * result:byte []) -> int

Encodes ion counts by simply rounding to the nearest 4 byte integer, and compressing each integer with encodeInt. "data" is the array of doubles to be encoded. "dataSize" is the number of doubles in data to be encoded. "result" is the array where resulting bytes should be stored. Returns the number of encoded bytes.

encodeSlof (...)
Signature: (data:double [] * dataSize:int * result:byte [] * fixedPoint:double) -> int

Encodes ion counts by taking the natural logarithm, and storing a fixed point representation of this. "data" is the array of doubles to be encoded. "dataSize" is the number of doubles in data to be encoded. "result" is the array where resulting bytes should be stored. "fixedPoint" is the the scaling factor used for getting the fixed point repr. This is stored in the binary and automatically extracted on decoding. Returns the number of encoded bytes.

optimalLinearFixedPoint (data, dataSize)
Signature: (data:double [] * dataSize:int) -> float<MeasureOne>

Determines the optimal fixed point for the function encodeLinear depending on the data to encode.

optimalSlofFixedPoint (data, dataSize)
Signature: (data:double [] * dataSize:int) -> float<MeasureOne>

Determines the optimal fixed point for the function encodeSlof depending on the data to encode.

Fork me on GitHub