diff options
author | Filipe Calasans <filipe.calasans@gmail.com> | 2020-02-07 22:52:25 (GMT) |
---|---|---|
committer | Filipe Calasans <filipe.calasans@gmail.com> | 2020-02-08 01:03:13 (GMT) |
commit | 781417a36997548c54c445c0e2e9634e69b0e0c6 (patch) | |
tree | 254a238d43dc87efec79f9b328d3f1831371b95a /programs/lz4cli.c | |
parent | 8372862e0f7e072cb206e96c70f6e1a796b66fe6 (diff) | |
download | lz4-781417a36997548c54c445c0e2e9634e69b0e0c6.zip lz4-781417a36997548c54c445c0e2e9634e69b0e0c6.tar.gz lz4-781417a36997548c54c445c0e2e9634e69b0e0c6.tar.bz2 |
Implement -m option with legacy format on cli
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r-- | programs/lz4cli.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c index aadccab..67dcaa1 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -94,7 +94,10 @@ static unsigned displayLevel = 2; /* 0 : no display ; 1: errors only ; 2 : dow #define DEFAULT_COMPRESSOR LZ4IO_compressFilename #define DEFAULT_DECOMPRESSOR LZ4IO_decompressFilename int LZ4IO_compressFilename_Legacy(LZ4IO_prefs_t* const prefs, const char* input_filename, const char* output_filename, int compressionlevel); /* hidden function */ - +int LZ4IO_compressMultipleFilenames_Legacy(LZ4IO_prefs_t* const prefs, + const char** inFileNamesTable, int ifntSize, + const char* suffix, + int compressionLevel); /*-*************************** * Functions @@ -754,7 +757,11 @@ int main(int argc, const char** argv) } else { /* compression is default action */ if (legacy_format) { DISPLAYLEVEL(3, "! Generating LZ4 Legacy format (deprecated) ! \n"); - LZ4IO_compressFilename_Legacy(prefs, input_filename, output_filename, cLevel); + if(multiple_inputs){ + LZ4IO_compressMultipleFilenames_Legacy(prefs, inFileNames, (int)ifnIdx, !strcmp(output_filename,stdoutmark) ? stdoutmark : LZ4_EXTENSION, cLevel); + } else { + LZ4IO_compressFilename_Legacy(prefs, input_filename, output_filename, cLevel); + } } else { if (multiple_inputs) { assert(ifnIdx <= INT_MAX); |