MCPcopy Create free account
hub / github.com/apache/arrow / Init

Method Init

cpp/src/arrow/util/compression_brotli.cc:104–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 }
103
104 Status Init() {
105 state_ = BrotliEncoderCreateInstance(nullptr, nullptr, nullptr);
106 if (state_ == nullptr) {
107 return BrotliError("Brotli init failed");
108 }
109 if (!BrotliEncoderSetParameter(state_, BROTLI_PARAM_QUALITY, compression_level_)) {
110 return BrotliError("Brotli set compression level failed");
111 }
112 if (!BrotliEncoderSetParameter(state_, BROTLI_PARAM_LGWIN, window_bits_)) {
113 return BrotliError("Brotli set window size failed");
114 }
115 return Status::OK();
116 }
117
118 Result<CompressResult> Compress(int64_t input_len, const uint8_t* input,
119 int64_t output_len, uint8_t* output) override {

Callers

nothing calls this directly

Calls 1

OKFunction · 0.50

Tested by

no test coverage detected