compressWithRemarksFallbackDetailed

Compress a packet, stripping remarks if needed, and return a detailed result that distinguishes the four possible outcomes:

wirePayloadremarksStrippedMeaning
bytesfalseFit as-is, no stripping needed
bytestrueStripped remarks to make it fit
nullfalseToo big, had no remarks to strip
nulltrueStripped 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.