In the write_dir example, the compression methods are iterated over in a loop and the resulting output zip file is repeatedly overwritten. Since ZStd is the last compression method in the loop, the output zip file is compressed using ZStd.
This change updates the write_dir example to use clap and adds the compression method as an argument. Deflated-Miniz and Deflated-Zlib are broken out as separate methods based on the specified feature. If the feature needed for the compression method is not specified, we exit from main with an error.
In the write_dir example, the compression methods are iterated over in a loop and the resulting output zip file is repeatedly overwritten. Since ZStd is the last compression method in the loop, the output zip file is compressed using ZStd.
This change updates the write_dir example to use clap and adds the compression method as an argument. Deflated-Miniz and Deflated-Zlib are broken out as separate methods based on the specified feature. If the feature needed for the compression method is not specified, we exit from main with an error.