aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/subblock/subblock_encoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-06-18 18:02:10 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-06-18 18:02:10 +0300
commit7d17818cec8597f847b0a2537fde991bbc3d9e96 (patch)
tree9c41502e3eb96f103fe98e13456b382fbba7a292 /src/liblzma/subblock/subblock_encoder.c
parentUpdate the file format specification draft. The new one is (diff)
downloadxz-7d17818cec8597f847b0a2537fde991bbc3d9e96.tar.xz
Update the code to mostly match the new simpler file format
specification. Simplify things by removing most of the support for known uncompressed size in most places. There are some miscellaneous changes here and there too. The API of liblzma has got many changes and still some more will be done soon. While most of the code has been updated, some things are not fixed (the command line tool will choke with invalid filter chain, if nothing else). Subblock filter is somewhat broken for now. It will be updated once the encoded format of the Subblock filter has been decided.
Diffstat (limited to '')
-rw-r--r--src/liblzma/subblock/subblock_encoder.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/liblzma/subblock/subblock_encoder.c b/src/liblzma/subblock/subblock_encoder.c
index a8aedbd7..01e8007a 100644
--- a/src/liblzma/subblock/subblock_encoder.c
+++ b/src/liblzma/subblock/subblock_encoder.c
@@ -51,7 +51,6 @@ do { \
struct lzma_coder_s {
lzma_next_coder next;
bool next_finished;
- bool use_eopm;
enum {
SEQ_FILL,
@@ -636,9 +635,10 @@ subblock_buffer(lzma_coder *coder, lzma_allocator *allocator,
coder->subfilter.mode_locked = false;
coder->sequence = SEQ_FILL;
- } else if (coder->use_eopm) {
+ } else {
assert(action == LZMA_FINISH);
+ // Write EOPM.
// NOTE: No need to use write_byte() here
// since we are finishing.
out[*out_pos] = 0x10;
@@ -797,7 +797,7 @@ subblock_buffer(lzma_coder *coder, lzma_allocator *allocator,
return_if_error(lzma_raw_encoder_init(
&coder->subfilter.subcoder, allocator,
- options, LZMA_VLI_VALUE_UNKNOWN, false));
+ options));
// Encode the Filter Flags field into a buffer. This should
// never fail since we have already successfully initialized
@@ -948,8 +948,6 @@ lzma_subblock_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->coder->next_finished = false;
next->coder->sequence = SEQ_FILL;
next->coder->options = filters[0].options;
- next->coder->use_eopm = filters[0].uncompressed_size
- == LZMA_VLI_VALUE_UNKNOWN;
next->coder->pos = 0;
next->coder->alignment.in_pos = 0;