mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Correction to LZO1X
@ 2007-07-11 12:53 Nitin Gupta
  0 siblings, 0 replies; only message in thread
From: Nitin Gupta @ 2007-07-11 12:53 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Markus F.X.J. Oberhumer, Richard Purdie

Hi,

This is correction for macro that gives worst case compressed data
size by LZO1X.


This patch was provided by the LZO author (Markus Oberhumer).

Signed-off-by: Nitin Gupta <nitingupta910@gmail.com>
---

diff --git a/include/linux/lzo.h b/include/linux/lzo.h
index 582d8b7..d793497 100644
--- a/include/linux/lzo.h
+++ b/include/linux/lzo.h
@@ -17,7 +17,7 @@
 #define LZO1X_MEM_COMPRESS     (16384 * sizeof(unsigned char *))
 #define LZO1X_1_MEM_COMPRESS   LZO1X_MEM_COMPRESS

-#define lzo1x_worst_compress(x) (x + (x / 64) + 16 + 3)
+#define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3)

 /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */
 int lzo1x_1_compress(const unsigned char *src, size_t src_len,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-11 12:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-11 12:53 Correction to LZO1X Nitin Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®