| 1068 | }; |
| 1069 | |
| 1070 | uint64_t Lz4CompressionSteam::doBlockCompression() { |
| 1071 | int result = LZ4_compress_fast_extState( |
| 1072 | static_cast<void*>(state_), reinterpret_cast<const char*>(rawInputBuffer.data()), |
| 1073 | reinterpret_cast<char*>(compressorBuffer.data()), bufferSize, |
| 1074 | static_cast<int>(compressorBuffer.size()), level); |
| 1075 | if (result == 0) { |
| 1076 | throw CompressionError("Error during block compression using lz4."); |
| 1077 | } |
| 1078 | return static_cast<uint64_t>(result); |
| 1079 | } |
| 1080 | |
| 1081 | void Lz4CompressionSteam::init() { |
| 1082 | state_ = LZ4_createStream(); |
nothing calls this directly
no test coverage detected