compress With Remarks Fallback Detailed
fun compressWithRemarksFallbackDetailed(packet: TakPacketV2Data, maxWireBytes: Int): TakCompressor.RemarksFallbackResult(source)
Compress a packet, stripping remarks if needed, and return a detailed result that distinguishes the four possible outcomes:
wirePayload | remarksStripped | Meaning |
|---|---|---|
| bytes | false | Fit as-is, no stripping needed |
| bytes | true | Stripped remarks to make it fit |
| null | false | Too big, had no remarks to strip |
| null | true | Stripped remarks, still too big |
Callers that want to log/meter "how often does remarks-stripping save a packet" or "how often do we drop oversized packets" should use this variant; compressWithRemarksFallback loses the distinction.
Throws
if the underlying zstd codec fails to compress.