aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/stream_encoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2013-10-02 12:55:11 +0300
committerLasse Collin <lasse.collin@tukaani.org>2013-10-02 12:55:11 +0300
commit97bb38712f414fabecca908af2e38a12570293fd (patch)
treecc16ca60363416ceacb18d955bae9105f3b0a8ee /src/liblzma/common/stream_encoder.c
parentliblzma: Add block_buffer_encoder.h into Makefile.inc. (diff)
downloadxz-97bb38712f414fabecca908af2e38a12570293fd.tar.xz
liblzma: Add LZMA_FULL_BARRIER support to single-threaded encoder.
In the single-threaded encoder LZMA_FULL_BARRIER is simply an alias for LZMA_FULL_FLUSH.
Diffstat (limited to 'src/liblzma/common/stream_encoder.c')
-rw-r--r--src/liblzma/common/stream_encoder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/liblzma/common/stream_encoder.c b/src/liblzma/common/stream_encoder.c
index df072d91..a7663bc4 100644
--- a/src/liblzma/common/stream_encoder.c
+++ b/src/liblzma/common/stream_encoder.c
@@ -146,11 +146,12 @@ stream_encode(lzma_coder *coder, const lzma_allocator *allocator,
}
case SEQ_BLOCK_ENCODE: {
- static const lzma_action convert[4] = {
+ static const lzma_action convert[LZMA_ACTION_MAX + 1] = {
LZMA_RUN,
LZMA_SYNC_FLUSH,
LZMA_FINISH,
LZMA_FINISH,
+ LZMA_FINISH,
};
const lzma_ret ret = coder->block_encoder.code(
@@ -324,6 +325,7 @@ lzma_stream_encoder(lzma_stream *strm,
strm->internal->supported_actions[LZMA_RUN] = true;
strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
+ strm->internal->supported_actions[LZMA_FULL_BARRIER] = true;
strm->internal->supported_actions[LZMA_FINISH] = true;
return LZMA_OK;