LzmaCompressor.drainEncoder

private size_t drainEncoder(lzma_action action)

Run lzma_code with the given action and copy produced bytes to _outBuf.

This is the single source of truth for the streaming pump used by write, flush, and finish. The returned slice length is the number of bytes written into _outBuf for this call.

Parameters

actionThe lzma_action to pass to lzma_code.

Returns

The number of compressed bytes produced in this call.