MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / decodeNP

Method decodeNP

src/openms/source/FORMAT/MSNumpressCoder.cpp:47–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 }
46
47 void MSNumpressCoder::decodeNP(const String & in, std::vector<double> & out,
48 bool zlib_compression, const NumpressConfig & config)
49 {
50 QByteArray base64_uncompressed;
51 Base64::decodeSingleString(in, base64_uncompressed, zlib_compression);
52
53 // Create a temporary string (*not* null-terminated) to hold the data
54 std::string tmpstring(base64_uncompressed.constData(), base64_uncompressed.size());
55 decodeNPRaw(tmpstring, out, config);
56
57 // NOTE: it is possible (and likely faster) to call directly the const
58 // unsigned char * function but this would make it necessary to deal with
59 // reinterpret_cast ugliness here ...
60 //
61 // decodeNP_internal_(reinterpret_cast<const unsigned char*>(base64_uncompressed.constData()), base64_uncompressed.size(), out, config);
62 }
63
64 void MSNumpressCoder::encodeNPRaw(const std::vector<double>& in, String& result, const NumpressConfig & config)
65 {

Callers 7

testNumpressCoderFunction · 0.95
test_decodeNP_SLOFMethod · 0.95
test_decodeNP_PICMethod · 0.95
test_decodeNP_LINEARMethod · 0.95
decodeBase64ArraysMethod · 0.80
START_SECTIONFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 5

testNumpressCoderFunction · 0.76
test_decodeNP_SLOFMethod · 0.76
test_decodeNP_PICMethod · 0.76
test_decodeNP_LINEARMethod · 0.76
START_SECTIONFunction · 0.64