1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

liblzma: Add support for LZMA_SYNC_FLUSH in the Block encoder.

The documentation mentions that lzma_block_encoder() supports
LZMA_SYNC_FLUSH but it was never added to supported_actions[]
in the internal structure. Because of this, LZMA_SYNC_FLUSH could
not be used with the Block encoder unless it was the next coder
after something like stream_encoder() or stream_encoder_mt().
This commit is contained in:
Jia Tan 2022-05-05 20:53:42 +08:00 committed by Lasse Collin
parent 6997e0b5e2
commit b0f8d9293c

View file

@ -217,6 +217,7 @@ lzma_block_encoder(lzma_stream *strm, lzma_block *block)
lzma_next_strm_init(lzma_block_encoder_init, strm, block);
strm->internal->supported_actions[LZMA_RUN] = true;
strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
strm->internal->supported_actions[LZMA_FINISH] = true;
return LZMA_OK;