aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/common.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-04-06 12:39:49 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-04-06 13:16:00 +0300
commit90621da7f6e1bfd6d91d60415eae04b2bca274c2 (patch)
tree94a29abbb0dd5d7a7a9646ac8390aff8c9c6f711 /src/liblzma/common/common.h
parentliblzma: Threaded decoder: Always wait for output if LZMA_FINISH is used. (diff)
downloadxz-90621da7f6e1bfd6d91d60415eae04b2bca274c2.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/common.h7
1 files changed, 4 insertions, 3 deletions
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.