]> granicus.if.org Git - cgit/commitdiff
ui-snapshot: actually compress zip archives
authorLars Hjemli <hjemli@gmail.com>
Wed, 1 Sep 2010 12:13:12 +0000 (12:13 +0000)
committerLars Hjemli <hjemli@gmail.com>
Wed, 1 Sep 2010 12:32:19 +0000 (12:32 +0000)
Since cgit linked with git-1.6.0 all zip archives has been uncompressed.
This patch fixes the issue by specifying Z_DEFAULT_COMPRESSION.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
ui-snapshot.c

index 4136b3eb8d05001b614b4f3ce3423dd897d4db0e..dbb556484a611040866915a5091ef0574cd9b865 100644 (file)
@@ -86,6 +86,7 @@ static int make_snapshot(const struct cgit_snapshot_format *format,
        }
        args.tree = commit->tree;
        args.time = commit->date;
+       args.compression_level = Z_DEFAULT_COMPRESSION;
        ctx.page.mimetype = xstrdup(format->mimetype);
        ctx.page.filename = xstrdup(filename);
        cgit_print_http_headers(&ctx);