diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-27 23:16:21 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-27 23:16:21 +0200 |
commit | 33b8a24b6646a9dbfd8358405aec466b13078559 (patch) | |
tree | 166b0977ca46fa664c0b7ceab6e64a59a7abe4d2 /src/liblzma/lzma/lzma_encoder_private.h | |
parent | liblzma: Avoid unneeded use of void pointer in LZMA decoder. (diff) | |
download | xz-33b8a24b6646a9dbfd8358405aec466b13078559.tar.xz |
liblzma: Add LZMA_FILTER_LZMA1EXT to support LZMA1 without end marker.
Some file formats need support for LZMA1 streams that don't use
the end of payload marker (EOPM) alias end of stream (EOS) marker.
So far liblzma API has supported decompressing such streams via
lzma_alone_decoder() when .lzma header specifies a known
uncompressed size. Encoding support hasn't been available in the API.
Instead of adding a new LZMA1-only API for this purpose, this commit
adds a new filter ID for use with raw encoder and decoder. The main
benefit of this approach is that then also filter chains are possible,
for example, if someone wants to implement support for .7z files that
use the x86 BCJ filter with LZMA1 (not BCJ2 as that isn't supported
in liblzma).
Diffstat (limited to 'src/liblzma/lzma/lzma_encoder_private.h')
-rw-r--r-- | src/liblzma/lzma/lzma_encoder_private.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liblzma/lzma/lzma_encoder_private.h b/src/liblzma/lzma/lzma_encoder_private.h index 8960c52c..b228c577 100644 --- a/src/liblzma/lzma/lzma_encoder_private.h +++ b/src/liblzma/lzma/lzma_encoder_private.h @@ -111,6 +111,9 @@ struct lzma_lzma1_encoder_s { /// have been written to the output buffer yet. bool is_flushed; + /// True if end of payload marker will be written. + bool use_eopm; + uint32_t pos_mask; ///< (1 << pos_bits) - 1 uint32_t literal_context_bits; uint32_t literal_pos_mask; |