From 90621da7f6e1bfd6d91d60415eae04b2bca274c2 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 6 Apr 2022 12:39:49 +0300 Subject: liblzma: Add a new flag LZMA_FAIL_FAST for threaded decoder. In most cases if the input file is corrupt the application won't care about the uncompressed content at all. With this new flag the threaded decoder will return an error as soon as any thread has detected an error; it won't wait to copy out the data before the location of the error. I don't plan to use this in xz to keep the behavior consistent between single-threaded and multi-threaded modes. --- src/liblzma/common/common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/liblzma/common/common.h') diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index 67996228..36366dbc 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -67,14 +67,15 @@ #define LZMA_FILTER_RESERVED_START (LZMA_VLI_C(1) << 62) -/// Supported flags that can be passed to lzma_stream_decoder() -/// or lzma_auto_decoder(). +/// Supported flags that can be passed to lzma_stream_decoder(), +/// lzma_auto_decoder(), or lzma_stream_decoder_mt(). #define LZMA_SUPPORTED_FLAGS \ ( LZMA_TELL_NO_CHECK \ | LZMA_TELL_UNSUPPORTED_CHECK \ | LZMA_TELL_ANY_CHECK \ | LZMA_IGNORE_CHECK \ - | LZMA_CONCATENATED ) + | LZMA_CONCATENATED \ + | LZMA_FAIL_FAST ) /// Largest valid lzma_action value as unsigned integer. -- cgit v1.2.3