OpenMS
ZlibCompression.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Hannes Roest $
6 // $Authors: Hannes Roest $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/CONCEPT/Types.h>
12 #include <OpenMS/OpenMSConfig.h>
14 
15 #include <string>
16 #include <vector>
17 
18 class QByteArray;
19 
20 namespace OpenMS
21 {
22  class String;
23 
31  class OPENMS_DLLAPI ZlibCompression
32  {
33 public:
34 
42  static void compressString(std::string& raw_data, std::string& compressed_data);
43 
52  static void compressData(const void* raw_data, const size_t in_length, std::string& compressed_data);
53 
54 
62  static void compressString(const QByteArray& raw_data, QByteArray& compressed_data);
63 
72  static void uncompressString(const void * compressed_data, size_t nr_bytes, std::string& raw_data);
73 
81  static void uncompressString(const QByteArray& compressed_data, QByteArray& raw_data);
82 
83  };
84 
85 } // namespace OpenMS
86 
87 
Compresses and uncompresses data using zlib.
Definition: ZlibCompression.h:32
static void uncompressString(const void *compressed_data, size_t nr_bytes, std::string &raw_data)
Uncompresses data using Qt (wrapper around Qt function)
static void compressString(std::string &raw_data, std::string &compressed_data)
Compresses data using zlib directly.
static void compressData(const void *raw_data, const size_t in_length, std::string &compressed_data)
Compresses data using zlib directly.
static void compressString(const QByteArray &raw_data, QByteArray &compressed_data)
Compresses data using Qt.
static void uncompressString(const QByteArray &compressed_data, QByteArray &raw_data)
Uncompresses data using Qt.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22