aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-06-19 16:35:08 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-06-19 16:35:08 +0300
commit0809c46534fa5664fe35d9e98d95e87312ed130e (patch)
tree6923ece40819c97cdd786dfdb01a7904043b1026 /src/liblzma/api
parentComments (diff)
downloadxz-0809c46534fa5664fe35d9e98d95e87312ed130e.tar.xz
Add limit of lc + lp <= 4. Now we can allocate the
literal coder as part of the main LZMA encoder or decoder structure. Make the LZMA decoder to rely on the current internal API to free the allocated memory in case an error occurs.
Diffstat (limited to 'src/liblzma/api')
-rw-r--r--src/liblzma/api/lzma/lzma.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/liblzma/api/lzma/lzma.h b/src/liblzma/api/lzma/lzma.h
index da0bb52d..9473f448 100644
--- a/src/liblzma/api/lzma/lzma.h
+++ b/src/liblzma/api/lzma/lzma.h
@@ -167,7 +167,7 @@ typedef struct {
*/
uint32_t literal_context_bits;
# define LZMA_LITERAL_CONTEXT_BITS_MIN 0
-# define LZMA_LITERAL_CONTEXT_BITS_MAX 8
+# define LZMA_LITERAL_CONTEXT_BITS_MAX 4
# define LZMA_LITERAL_CONTEXT_BITS_DEFAULT 3
/**
@@ -279,6 +279,14 @@ typedef struct {
/**
+ * \brief Maximum sum of literal_context_bits and literal_pos_bits
+ *
+ * literal_context_bits + literal_pos_bits <= LZMA_LITERAL_BITS_MAX
+ */
+#define LZMA_LITERAL_BITS_MAX 4
+
+
+/**
* \brief Available LZMA encoding modes
*
* Pointer to an array containing the list of available encoding modes.