File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 4
4
#include < string>
5
5
#include < optional>
6
6
7
+ /* *
8
+ * @brief Compresses the input sequence using zlib.
9
+ *
10
+ * This function takes a string representing the decompressed data as input
11
+ * and compresses it using zlib. If compression is successful, the compressed
12
+ * data is returned as an optional string. If compression fails, an empty optional
13
+ * is returned.
14
+ *
15
+ * @param decompressed The input string representing the decompressed data.
16
+ * @return An optional string containing the compressed data if compression is successful,
17
+ * or an empty optional if compression fails.
18
+ */
7
19
std::optional<std::string> tryCompress (const std::string& decompressed);
20
+
21
+ /* *
22
+ * @brief Decompresses the compressed sequence using zlib.
23
+ *
24
+ * This function takes a string representing the compressed data as input
25
+ * and decompresses it using zlib. If decompression is successful, the decompressed
26
+ * data is returned as an optional string. If decompression fails, an empty optional
27
+ * is returned.
28
+ *
29
+ * @param compressed The input string representing the compressed data.
30
+ * @return An optional string containing the decompressed data if decompression is successful,
31
+ * or an empty optional if decompression fails.
32
+ */
8
33
std::optional<std::string> tryDecompress (const std::string& compressed);
9
34
10
35
#endif /* ZLIBUTILS_H */
You can’t perform that action at this time.
0 commit comments