| 184 | window_bits_(window_bits) {} |
| 185 | |
| 186 | Result<int64_t> Decompress(int64_t input_len, const uint8_t* input, |
| 187 | int64_t output_buffer_len, uint8_t* output_buffer) override { |
| 188 | DCHECK_GE(input_len, 0); |
| 189 | DCHECK_GE(output_buffer_len, 0); |
| 190 | std::size_t output_size = static_cast<size_t>(output_buffer_len); |
| 191 | if (BrotliDecoderDecompress(static_cast<size_t>(input_len), input, &output_size, |
| 192 | output_buffer) != BROTLI_DECODER_RESULT_SUCCESS) { |
| 193 | return Status::IOError("Corrupt brotli compressed data."); |
| 194 | } |
| 195 | return output_size; |
| 196 | } |
| 197 | |
| 198 | int64_t MaxCompressedLen(int64_t input_len, |
| 199 | const uint8_t* ARROW_ARG_UNUSED(input)) override { |