File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ std::optional<std::string> try_compress(const std::string& decompressed) {
17
17
zs.avail_in = decompressed.size ();
18
18
19
19
int ret_code;
20
- char * result_buffer = new char [32768 ];
20
+ char * result_buffer = new char [BYTES_NUM_IN_32KB ];
21
21
std::string result;
22
22
23
23
do {
@@ -54,7 +54,7 @@ std::optional<std::string> try_decompress(const std::string& compressed) {
54
54
zs.avail_in = compressed.size ();
55
55
56
56
int ret_code;
57
- char * result_buffer = new char [32768 ];
57
+ char * result_buffer = new char [BYTES_NUM_IN_32KB ];
58
58
std::string result;
59
59
60
60
do {
Original file line number Diff line number Diff line change 6
6
#include < string>
7
7
#include < optional>
8
8
9
+ constexpr const int BYTES_NUM_IN_32KB = 32768 ;
10
+
9
11
/* *
10
12
* @brief Compresses the input sequence using zlib.
11
13
*
You can’t perform that action at this time.
0 commit comments