Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GZipOutputStream is the destination and not the source #741

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

nickl-
Copy link

@nickl- nickl- commented Apr 5, 2022

Changed the variable names to make it clear and assign the correct stream order to the Copy function.
Fixed typo in StreamUtils class name

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

Wow!! what's with all the legalese =(

Changed the variable names to make it clear and assign the correct stream order to the `Copy` function.
Fixed typo in `StreamUtils` class name
Copy link
Member

@piksel piksel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation is generated from the comments and will be overwritten next time they are generated. The change should go here:

/// public static void Main(string[] args)
/// {
/// using (Stream s = new GZipOutputStream(File.Create(args[0] + ".gz")))
/// using (FileStream fs = File.OpenRead(args[0])) {
/// byte[] writeData = new byte[4096];
/// Streamutils.Copy(s, fs, writeData);
/// }
/// }

I personally think the in and out is less helpful than fs and gzos, as long as the order is correct (which it obviously wasn't in this case).

@piksel
Copy link
Member

piksel commented Apr 6, 2022

Wow!! what's with all the legalese =(

It's because ICSharpCode is a (non-profit) organization that may need to actually deal with legal stuff :(

@christophwille
Copy link
Member

History - see issue #103 (plus my comment here #101 (comment)). That little snippet ensures that the entire code base is properly MIT-licensed for everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants