summaryrefslogtreecommitdiff
path: root/mkfs.ubifs/compr.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-10-22 14:23:00 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-10-22 15:31:12 +0300
commit06ff08f391e0297c4fcde63b801e6992d2238ae2 (patch)
tree9ed853db391876a887962c1d75b1c13786ce85bf /mkfs.ubifs/compr.h
parentd217a4e65084b0ef807e5749513bff16ddfb0b58 (diff)
Define the worst case compression constant
It will be used in the next patches. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'mkfs.ubifs/compr.h')
-rw-r--r--mkfs.ubifs/compr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/mkfs.ubifs/compr.h b/mkfs.ubifs/compr.h
index c76a5b9..e3dd95c 100644
--- a/mkfs.ubifs/compr.h
+++ b/mkfs.ubifs/compr.h
@@ -23,6 +23,14 @@
#ifndef __UBIFS_COMPRESS_H__
#define __UBIFS_COMPRESS_H__
+/*
+ * Compressors may end-up with more data in the output buffer than in the input
+ * buffer. This constant defined the worst case factor, i.e. we assume that the
+ * output buffer may be at max. WORST_COMPR_FACTOR times larger than input
+ * buffer.
+ */
+#define WORST_COMPR_FACTOR 4
+
enum compression_type
{
MKFS_UBIFS_COMPR_NONE,