Skip to content

Commit edb8fd4

Browse files
committed
add documentation for tryCompress and tryDecompress methods in zlibutils
1 parent d5168df commit edb8fd4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

vpr/src/server/zlibutils.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,32 @@
44
#include <string>
55
#include <optional>
66

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+
*/
719
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+
*/
833
std::optional<std::string> tryDecompress(const std::string& compressed);
934

1035
#endif /* ZLIBUTILS_H */

0 commit comments

Comments
 (0)