stripSyncFlushMarker

fun ReadBuffer.stripSyncFlushMarker(): ReadBuffer

Strips the Z_SYNC_FLUSH marker (00 00 FF FF) from the end of compressed data.

When using SuspendingStreamingCompressor.flush or StreamingCompressor.flush, the output ends with this 4-byte sync marker. Some protocols (like WebSocket permessage-deflate) require stripping this marker before transmission.

Return

The buffer with the marker removed by adjusting the limit. If the marker is not present, returns the buffer unchanged.