From f9842f712732c482f2def9f24437851e57dd83f8 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 26 Jan 2008 00:25:34 +0200 Subject: Return LZMA_HEADER_ERROR if LZMA_SYNC_FLUSH is used with any of the so called simple filters. If there is demand, limited support for LZMA_SYNC_FLUSH may be added in future. After this commit, using LZMA_SYNC_FLUSH shouldn't cause undefined behavior in any situation. --- src/liblzma/api/lzma/simple.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/liblzma/api') diff --git a/src/liblzma/api/lzma/simple.h b/src/liblzma/api/lzma/simple.h index fb78d01f..807a4c46 100644 --- a/src/liblzma/api/lzma/simple.h +++ b/src/liblzma/api/lzma/simple.h @@ -64,6 +64,15 @@ * * If options with non-default values have been specified when encoding, * the same options must also be specified when decoding. + * + * \note At the moment, none of the simple filters support + * LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified, + * LZMA_HEADER_ERROR will be returned. If there is need, + * partial support for LZMA_SYNC_FLUSH can be added in future. + * Partial means that flushing would be possible only at + * offsets that are multiple of 2, 4, or 16 depending on + * the filter, except x86 which cannot be made to support + * LZMA_SYNC_FLUSH predictably. */ typedef struct { /** -- cgit v1.2.3