From b6c2f82ff9e9bbe53ce372f58b60feef2733f577 Mon Sep 17 00:00:00 2001 From: unknown author <cooker@mandrivalinux.org> Date: Thu, 12 Feb 2009 10:59:31 +0000 Subject: [PATCH 24/36] xz support --- rpmio/rpmio.c | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 6473d55..30a797a 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -723,7 +723,7 @@ typedef struct lzfile { static LZFILE *lzopen_internal(const char *mode, int fd, int xz) { - int level = 7; /* Use XZ's default compression level if unspecified */ + int level = LZMA_PRESET_DEFAULT; int encoding = 0; FILE *fp; LZFILE *lzfile; @@ -748,7 +748,7 @@ static LZFILE *lzopen_internal(const cha lzfile->strm = init_strm; if (encoding) { if (xz) { - ret = lzma_easy_encoder(&lzfile->strm, level, LZMA_CHECK_SHA256); + ret = lzma_easy_encoder(&lzfile->strm, level, LZMA_CHECK_CRC32); } else { lzma_options_lzma options; lzma_lzma_preset(&options, level); -- 1.6.4.4