Skip to content

Commit

Permalink
Allow the option to use no 2nd stage compression with lrzip.
Browse files Browse the repository at this point in the history
  • Loading branch information
amejia1 committed Feb 24, 2013
1 parent 1016793 commit 21b21bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libarchive/archive_write_add_filter_lrzip.c
Expand Up @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
struct write_lrzip {
struct archive_write_program_data *pdata;
int compression_level;
enum { lzma = 0, bzip2, gzip, lzo, zpaq } compression;
enum { lzma = 0, bzip2, gzip, lzo, none, zpaq } compression;
};

static int archive_write_lrzip_open(struct archive_write_filter *);
Expand Down Expand Up @@ -107,6 +107,8 @@ archive_write_lrzip_options(struct archive_write_filter *f, const char *key,
data->compression = gzip;
else if (strcmp(value, "lzo") == 0)
data->compression = lzo;
else if (strcmp(value, "none") == 0)
data->compression = none;
else if (strcmp(value, "zpaq") == 0)
data->compression = zpaq;
else
Expand Down Expand Up @@ -148,6 +150,9 @@ archive_write_lrzip_open(struct archive_write_filter *f)
case lzo:
archive_strcat(&as, " -l");
break;
case none:
archive_strcat(&as, " -n");
break;
case zpaq:
archive_strcat(&as, " -z");
break;
Expand Down

0 comments on commit 21b21bc

Please sign in to comment.