All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joachim B Haga <cjhaga@fys.uio.no>
To: git@vger.kernel.org
Cc: Nicolas Pitre <nico@cam.org>, Linus Torvalds <torvalds@osdl.org>,
	Alex Riesen <raa.lkml@gmail.com>, Junio C Hamano <junkio@cox.net>
Subject: [PATCH] Use configurable zlib compression level everywhere.
Date: 03 Jul 2006 21:02:29 +0200	[thread overview]
Message-ID: <8564ie8qbe.fsf_-_@lupus.ig3.net> (raw)
In-Reply-To: Pine.LNX.4.64.0607030929490.12404@g5.osdl.org

This one I'm not so sure about, it's for completeness. But I don't actually use
git and haven't tested beyond the git add / git commit stage. Still...

Signed-off-by: Joachim B Haga (cjhaga@fys.uio.no)
---
 csum-file.c |    2 +-
 diff.c      |    2 +-
 http-push.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/csum-file.c b/csum-file.c
index ebaad03..6a7b40f 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -122,7 +122,7 @@ int sha1write_compressed(struct sha1file
        void *out;
 
        memset(&stream, 0, sizeof(stream));
-       deflateInit(&stream, Z_DEFAULT_COMPRESSION);
+       deflateInit(&stream, zlib_compression_level);
        maxsize = deflateBound(&stream, size);
        out = xmalloc(maxsize);
 
diff --git a/diff.c b/diff.c
index 5a71489..428ff78 100644
--- a/diff.c
+++ b/diff.c
@@ -583,7 +583,7 @@ static unsigned char *deflate_it(char *d
        z_stream stream;
 
        memset(&stream, 0, sizeof(stream));
-       deflateInit(&stream, Z_BEST_COMPRESSION);
+       deflateInit(&stream, zlib_compression_level);
        bound = deflateBound(&stream, size);
        deflated = xmalloc(bound);
        stream.next_out = deflated;
diff --git a/http-push.c b/http-push.c
index e281f70..f761584 100644
--- a/http-push.c
+++ b/http-push.c
@@ -492,7 +492,7 @@ static void start_put(struct transfer_re
 
        /* Set it up */
        memset(&stream, 0, sizeof(stream));
-       deflateInit(&stream, Z_BEST_COMPRESSION);
+       deflateInit(&stream, zlib_compression_level);
        size = deflateBound(&stream, len + hdrlen);
        request->buffer.buffer = xmalloc(size);
 
-- 
1.4.1.g8fced-dirty

  parent reply	other threads:[~2006-07-03 19:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 11:13 Compression speed for large files Joachim B Haga
2006-07-03 12:03 ` Alex Riesen
2006-07-03 12:42   ` Elrond
2006-07-03 13:44     ` Joachim B Haga
2006-07-03 13:32   ` Joachim Berdal Haga
     [not found]     ` <Pine.LN X.4.64.0607031030150.1213@localhost.localdomain>
2006-07-03 14:33     ` Nicolas Pitre
2006-07-03 14:54       ` Yakov Lerner
2006-07-03 15:17         ` Johannes Schindelin
2006-07-03 16:31       ` Linus Torvalds
2006-07-03 18:59         ` [PATCH] Make zlib compression level configurable, and change default Joachim B Haga
2006-07-03 19:33           ` Linus Torvalds
2006-07-03 19:50             ` Linus Torvalds
2006-07-03 20:11             ` Joachim B Haga
2006-07-03 19:02         ` Joachim B Haga [this message]
2006-07-03 19:43           ` [PATCH] Use configurable zlib compression level everywhere Junio C Hamano
2006-07-07 21:53             ` David Lang
2006-07-08  2:10               ` Johannes Schindelin
2006-07-03 21:45 ` Compression speed for large files Jeff King
2006-07-03 22:25   ` Joachim Berdal Haga
2006-07-03 23:02     ` Linus Torvalds
2006-07-04  5:42       ` Joachim Berdal Haga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8564ie8qbe.fsf_-_@lupus.ig3.net \
    --to=cjhaga@fys.uio.no \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=nico@cam.org \
    --cc=raa.lkml@gmail.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.