Skip to content

Commit

Permalink
[CLI] Add -d|--dictionaries option to compress command
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Jul 4, 2023
1 parent 1237c66 commit c08c9a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CommandProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void Process(List<string> args)
if (args[0].AsFlag() == 'h') {
Console.WriteLine("""
Compress a file:
c, compress <file-path> [-o|--output] [-h|--help]
c, compress <file-path> [-o|--output] [-d|--dictionaries] [-h|--help]

Decompress a file:
d, decompress <file-path> [-o|--output] [-h|--help]
Expand Down Expand Up @@ -67,7 +67,7 @@ public static void Compress(string input, Dictionary<char, string> flags)

Directory.CreateDirectory(Path.GetDirectoryName(output)!);
using FileStream fs = File.Create(output);
fs.Write(ZStdHelper.Compress(input));
fs.Write(ZStdHelper.Compress(input, useDictionaries: flags.ContainsKey('d')));
}

public static void Decompress(string input, Dictionary<char, string> flags)
Expand Down

0 comments on commit c08c9a5

Please sign in to comment.