| 87 | } |
| 88 | |
| 89 | Status Reset() override { |
| 90 | #if defined(LZ4_VERSION_NUMBER) && LZ4_VERSION_NUMBER >= 10800 |
| 91 | // LZ4F_resetDecompressionContext appeared in 1.8.0 |
| 92 | DCHECK_NE(ctx_, nullptr); |
| 93 | LZ4F_resetDecompressionContext(ctx_); |
| 94 | finished_ = false; |
| 95 | return Status::OK(); |
| 96 | #else |
| 97 | if (ctx_ != nullptr) { |
| 98 | ARROW_UNUSED(LZ4F_freeDecompressionContext(ctx_)); |
| 99 | } |
| 100 | return Init(); |
| 101 | #endif |
| 102 | } |
| 103 | |
| 104 | Result<DecompressResult> Decompress(int64_t input_len, const uint8_t* input, |
| 105 | int64_t output_len, uint8_t* output) override { |