| 142 | } |
| 143 | |
| 144 | Status Init() { |
| 145 | LZ4F_errorCode_t ret; |
| 146 | prefs_ = PreferencesWithCompressionLevel(compression_level_); |
| 147 | first_time_ = true; |
| 148 | |
| 149 | ret = LZ4F_createCompressionContext(&ctx_, LZ4F_VERSION); |
| 150 | if (LZ4F_isError(ret)) { |
| 151 | return LZ4Error(ret, "LZ4 init failed: "); |
| 152 | } else { |
| 153 | return Status::OK(); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | #define BEGIN_COMPRESS(dst, dst_capacity, output_too_small) \ |
| 158 | if (first_time_) { \ |
no test coverage detected