| 549 | |
| 550 | #if HAVE_BROTLI_ENCODE_H |
| 551 | static void |
| 552 | brotli_transform_finish(Data *data) |
| 553 | { |
| 554 | if (data->state != transform_state_output) { |
| 555 | return; |
| 556 | } |
| 557 | |
| 558 | data->state = transform_state_finished; |
| 559 | |
| 560 | bool ok = brotli_compress_operation(data, nullptr, 0, BROTLI_OPERATION_FINISH); |
| 561 | if (!ok) { |
| 562 | error("BrotliEncoderCompressStream(PROCESS) call failed"); |
| 563 | return; |
| 564 | } |
| 565 | |
| 566 | if (data->downstream_length != static_cast<int64_t>(data->bstrm.total_out)) { |
| 567 | error("brotli-transform: output lengths don't match (%d, %ld)", data->downstream_length, data->bstrm.total_out); |
| 568 | } |
| 569 | |
| 570 | debug("brotli-transform: Finished brotli"); |
| 571 | log_compression_ratio(data->bstrm.total_in, data->downstream_length); |
| 572 | } |
| 573 | #endif |
| 574 | |
| 575 | static void |
no test coverage detected