MCPcopy Create free account
hub / github.com/apache/trafficserver / brotli_transform_one

Function brotli_transform_one

plugins/compress/compress.cc:446–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446static void
447brotli_transform_one(Data *data, const char *upstream_buffer, int64_t upstream_length)
448{
449 bool ok = brotli_compress_operation(data, upstream_buffer, upstream_length, BROTLI_OPERATION_PROCESS);
450 if (!ok) {
451 error("BrotliEncoderCompressStream(PROCESS) call failed");
452 return;
453 }
454
455 data->bstrm.total_in += upstream_length;
456
457 if (!data->hc->flush()) {
458 return;
459 }
460
461 ok = brotli_compress_operation(data, nullptr, 0, BROTLI_OPERATION_FLUSH);
462 if (!ok) {
463 error("BrotliEncoderCompressStream(FLUSH) call failed");
464 return;
465 }
466}
467#endif
468
469static void

Callers 1

compress_transform_oneFunction · 0.85

Calls 3

errorFunction · 0.85
flushMethod · 0.45

Tested by

no test coverage detected