decode
public static MZMLPeaksDecoder.DecodedData decode(byte[] bytesIn,
int lengthIn,
Integer precision,
int numPoints,
EnumSet<PeaksCompression> compressions)
throws DataFormatException,
IOException,
FileParsingException
Converts a base64 encoded mz or intensity string used in mzML files to an array of doubles.
If the original precision was 32 bit, you still get doubles as output, would
be too complicated to provide another method to parseIndexEntries them as floats.
Hopefully some day everything will be in 64 bits anyway.
- Parameters:
bytesIn - Byte array, decoded from a base64 encoded string
E.g. like: eNoNxltIkwEYBuAOREZFhrCudGFbbraTU+Zmue...
lengthIn - length of data to be treated as values, i.e. the input array can be longer, the values to be
interpreted must start at offset 0, and this will indicate the length
precision - allowed values: 32 and 64, can be null only if MS-NUMPRESS compression was applied and is
specified in the @{code compressions} enum set.
numPoints -
compressions - null or PeaksCompression.NONE have the
same effect. Otherwise the binary data will be inflated according to the compression rules.
- Returns:
- Throws:
DataFormatException
IOException
FileParsingException