aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma/lzma_encoder.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-11-27 23:16:21 +0200
committerLasse Collin <lasse.collin@tukaani.org>2022-11-27 23:16:21 +0200
commit33b8a24b6646a9dbfd8358405aec466b13078559 (patch)
tree166b0977ca46fa664c0b7ceab6e64a59a7abe4d2 /src/liblzma/lzma/lzma_encoder.h
parentliblzma: Avoid unneeded use of void pointer in LZMA decoder. (diff)
downloadxz-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.h')
-rw-r--r--src/liblzma/lzma/lzma_encoder.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liblzma/lzma/lzma_encoder.h b/src/liblzma/lzma/lzma_encoder.h
index 6cfdf228..84d8c916 100644
--- a/src/liblzma/lzma/lzma_encoder.h
+++ b/src/liblzma/lzma/lzma_encoder.h
@@ -40,7 +40,8 @@ extern bool lzma_lzma_lclppb_encode(
/// Initializes raw LZMA encoder; this is used by LZMA2.
extern lzma_ret lzma_lzma_encoder_create(
void **coder_ptr, const lzma_allocator *allocator,
- const lzma_options_lzma *options, lzma_lz_options *lz_options);
+ lzma_vli id, const lzma_options_lzma *options,
+ lzma_lz_options *lz_options);
/// Resets an already initialized LZMA encoder; this is used by LZMA2.