mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
GZipStream's FileName should be set when constructing object #217
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @turbolocust on GitHub (Jul 15, 2017).
One issue I've found is that the FileName of GZipStream only is set after the first call of the Read() method. That should happen when constructing the object like it's implemented in the commons-compress library (written in Java) of Apache Foundation. The current behavior makes an object-oriented design more complicated.
In the example code above I'd have to rename the file after the loop or read the compressed file first, create the output file and then start to decompress the compressed file. The extract of the method shown above is defined in an abstract class.