aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/raw_decoder.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/common/raw_decoder.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 'src/liblzma/common/raw_decoder.c')
-rw-r--r--src/liblzma/common/raw_decoder.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/liblzma/common/raw_decoder.c b/src/liblzma/common/raw_decoder.c
index 03f1d847..4fb7111c 100644
--- a/src/liblzma/common/raw_decoder.c
+++ b/src/liblzma/common/raw_decoder.c
@@ -18,24 +18,17 @@
///////////////////////////////////////////////////////////////////////////////
#include "raw_decoder.h"
-#include "copy_coder.h"
#include "simple_coder.h"
#include "subblock_decoder.h"
#include "subblock_decoder_helper.h"
#include "delta_decoder.h"
#include "lzma_decoder.h"
-#include "metadata_decoder.h"
static lzma_init_function
get_function(lzma_vli id)
{
switch (id) {
-#ifdef HAVE_FILTER_COPY
- case LZMA_FILTER_COPY:
- return &lzma_copy_decoder_init;
-#endif
-
#ifdef HAVE_FILTER_SUBBLOCK
case LZMA_FILTER_SUBBLOCK:
return &lzma_subblock_decoder_init;
@@ -93,12 +86,10 @@ get_function(lzma_vli id)
extern lzma_ret
lzma_raw_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
- const lzma_options_filter *options,
- lzma_vli uncompressed_size, bool allow_implicit)
+ const lzma_options_filter *options)
{
const lzma_ret ret = lzma_raw_coder_init(next, allocator,
- options, uncompressed_size, &get_function,
- allow_implicit, false);
+ options, &get_function, false);
if (ret != LZMA_OK)
lzma_next_coder_end(next, allocator);
@@ -108,8 +99,7 @@ lzma_raw_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
extern LZMA_API lzma_ret
-lzma_raw_decoder(lzma_stream *strm, const lzma_options_filter *options,
- lzma_vli uncompressed_size, lzma_bool allow_implicit)
+lzma_raw_decoder(lzma_stream *strm, const lzma_options_filter *options)
{
return_if_error(lzma_strm_init(strm));
@@ -117,8 +107,7 @@ lzma_raw_decoder(lzma_stream *strm, const lzma_options_filter *options,
strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
const lzma_ret ret = lzma_raw_coder_init(&strm->internal->next,
- strm->allocator, options, uncompressed_size,
- &get_function, allow_implicit, false);
+ strm->allocator, options, &get_function, false);
if (ret != LZMA_OK)
lzma_end(strm);