From 77f6965f2513d28c015b14565ae39366b2ecdbcc Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 16 Mar 2012 23:20:54 +1100 Subject: [PATCH] Re-instantiate the lzo compresses test for zpaq compression. --- stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stream.c b/stream.c index 3325e24..7dc56f1 100644 --- a/stream.c +++ b/stream.c @@ -177,8 +177,11 @@ static int lzo_compresses(rzip_control *control, uchar *s_buf, i64 s_len); static int zpaq_compress_buf(rzip_control *control, struct compress_thread *cthread, long thread) { - i64 c_len = 0; uchar *c_buf; + i64 c_len; + + if (!lzo_compresses(control, cthread->s_buf, cthread->s_len)) + return 0; c_buf = malloc(cthread->s_len + control->page_size); if (!c_buf) { @@ -186,6 +189,8 @@ static int zpaq_compress_buf(rzip_control *control, struct compress_thread *cthr return -1; } + c_len = 0; + zpaq_compress(c_buf, &c_len, cthread->s_buf, cthread->s_len, control->compression_level / 4 + 1); if (unlikely(c_len >= cthread->c_len)) {