diff options
author | Kyle J Harper <KyleJHarper@gmail.com> | 2015-04-12 22:28:13 (GMT) |
---|---|---|
committer | Kyle J Harper <KyleJHarper@gmail.com> | 2015-04-12 22:33:40 (GMT) |
commit | 0169502b49dfa5eb8878f5c85be3270012266fc3 (patch) | |
tree | 1145efbd28cb78f319e296582f2f9eb8c580f210 /programs/lz4cli.c | |
parent | 160661c7a4cbf805f4af74d2e3932a17a66e6ce7 (diff) | |
download | lz4-0169502b49dfa5eb8878f5c85be3270012266fc3.zip lz4-0169502b49dfa5eb8878f5c85be3270012266fc3.tar.gz lz4-0169502b49dfa5eb8878f5c85be3270012266fc3.tar.bz2 |
Added new LZ4IO_decompressMultipleFilenames to allow decompression of multiple files with the -m switch added in r128 (ref: google code issue 151). Limitation: will only process files matching LZ4_EXTENSION macro, which for now seems reasonable.
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r-- | programs/lz4cli.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c index da5da71..f7cf27e 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -515,22 +515,28 @@ int main(int argc, char** argv) /* IO Stream/File */ LZ4IO_setNotificationLevel(displayLevel); - if (decode) DEFAULT_DECOMPRESSOR(input_filename, output_filename); + if (decode) + { + if (multiple_inputs) + LZ4IO_decompressMultipleFilenames(inFileNames, ifnIdx, LZ4_EXTENSION); + else + DEFAULT_DECOMPRESSOR(input_filename, output_filename); + } else { - /* compression is default action */ - if (legacy_format) - { - DISPLAYLEVEL(3, "! Generating compressed LZ4 using Legacy format (deprecated) ! \n"); - LZ4IO_compressFilename_Legacy(input_filename, output_filename, cLevel); - } + /* compression is default action */ + if (legacy_format) + { + DISPLAYLEVEL(3, "! Generating compressed LZ4 using Legacy format (deprecated) ! \n"); + LZ4IO_compressFilename_Legacy(input_filename, output_filename, cLevel); + } + else + { + if (multiple_inputs) + LZ4IO_compressMultipleFilenames(inFileNames, ifnIdx, LZ4_EXTENSION, cLevel); else - { - if (multiple_inputs) - LZ4IO_compressMultipleFilenames(inFileNames, ifnIdx, LZ4_EXTENSION, cLevel); - else - DEFAULT_COMPRESSOR(input_filename, output_filename, cLevel); - } + DEFAULT_COMPRESSOR(input_filename, output_filename, cLevel); + } } if (main_pause) waitEnter(); |