We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2dfa617 commit d815b7cCopy full SHA for d815b7c
1 file changed
src/iceberg/table_metadata.cc
@@ -21,6 +21,7 @@
21
22
#include <zlib.h>
23
24
+#include <array>
25
#include <format>
26
#include <string>
27
@@ -160,13 +161,13 @@ Result<std::string> DecompressGZIPFile(const std::string& filepath) {
160
161
return IOError("Failed to open gzip file:{} ", filepath);
162
}
163
- const int CHUNK_SIZE = 32768; // 32KB chunks
164
- char buffer[CHUNK_SIZE];
+ static const int CHUNK_SIZE = 32768; // 32KB chunks
165
+ std::array<char, CHUNK_SIZE> buffer;
166
std::string result;
167
int bytes_read;
168
- while ((bytes_read = gzread(file, buffer, CHUNK_SIZE)) > 0) {
169
- result.append(buffer, bytes_read);
+ while ((bytes_read = gzread(file, buffer.data(), CHUNK_SIZE)) > 0) {
170
+ result.append(buffer.data(), bytes_read);
171
172
173
int err;
0 commit comments