MSNumpressCoder
- class pyopenms.MSNumpressCoder
Bases:
objectCython implementation of _MSNumpressCoder
Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1MSNumpressCoder.html
- __init__()
Cython signature: void MSNumpressCoder()
Cython signature: void MSNumpressCoder(MSNumpressCoder &)
Methods
Cython signature: void MSNumpressCoder()
Cython signature: void decodeNP(const String & in_, libcpp_vector[double] & out, bool zlib_compression, NumpressConfig config)
Cython signature: void decodeNPRaw(const String & in_, libcpp_vector[double] & out, NumpressConfig config)
Cython signature: void encodeNP(libcpp_vector[double] in_, String & result, bool zlib_compression, NumpressConfig config)
Cython signature: void encodeNPRaw(libcpp_vector[double] in_, String & result, NumpressConfig config)
- NumpressCompression
alias of
pyopenms.pyopenms_2.__NumpressCompression
- decodeNP()
Cython signature: void decodeNP(const String & in_, libcpp_vector[double] & out, bool zlib_compression, NumpressConfig config)
This code is obtained from the proteowizard implementation ./pwiz/pwiz/data/msdata/BinaryDataEncoder.cpp (adapted by Hannes Roest) —– This function will first decode the input base64 string (with optional zlib decompression after decoding) and then apply numpress decoding to the data —– :param in: The base64 encoded string :param out: The resulting vector of doubles :param zlib_compression: Whether to apply zlib de-compression before numpress de-compression :param config: The numpress configuration defining the compression strategy :raises:
Exception: ConversionError if the string cannot be converted
- decodeNPRaw()
Cython signature: void decodeNPRaw(const String & in_, libcpp_vector[double] & out, NumpressConfig config)
:note The string in should only contain the data and _no_ extra null terminating byte —– This performs the raw numpress decoding on a raw byte array (not Base64 encoded). Therefore the input string is likely unsafe to handle and is basically a byte container —– Please use the safe versions above unless you need access to the raw byte arrays —– :param in: The base64 encoded string :param out: The resulting vector of doubles :param config: The numpress configuration defining the compression strategy
- encodeNP()
Cython signature: void encodeNP(libcpp_vector[double] in_, String & result, bool zlib_compression, NumpressConfig config)
This code is obtained from the proteowizard implementation ./pwiz/pwiz/data/msdata/BinaryDataEncoder.cpp (adapted by Hannes Roest) —– This function will first apply the numpress encoding to the data, then encode the result in base64 (with optional zlib compression before base64 encoding) —– :note In case of error, result string is empty —– :param in: The vector of floating point numbers to be encoded :param result: The resulting string :param zlib_compression: Whether to apply zlib compression after numpress compression :param config: The numpress configuration defining the compression strategy
- encodeNPRaw()
Cython signature: void encodeNPRaw(libcpp_vector[double] in_, String & result, NumpressConfig config)
:note In case of error, “result” is given back unmodified :note The result is not a string but a raw byte array and may contain zero bytes —– This performs the raw numpress encoding on a set of data and does no Base64 encoding on the result. Therefore the result string is likely unsafe to handle and is a raw byte array. —– Please use the safe versions above unless you need access to the raw byte arrays —– :param in: The vector of floating point numbers to be encoded :param result: The resulting string :param config: The numpress configuration defining the compression strategy