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

Added transparent GZIP decompression. #10

Merged
merged 2 commits into from
Sep 1, 2012
Merged

Added transparent GZIP decompression. #10

merged 2 commits into from
Sep 1, 2012

Conversation

HedAurabesh
Copy link
Contributor

This commit adds two new constructors that allow the user
to specify whether or not to detect GZIP compressed files
and automatically decompress them during reading.

This is especially useful for Jenkins, as it will allow
transparent reading of GZIPed log files. A pull request
for the requisite change to Jenkins will follow shortly.

Do note that the API change is opt-in and backward-
compatible should thus not break any other package or
older Jenkins version.

Signed-off-by: Martin Schroeder martin.h.schroeder@intel.com

This commit adds two new constructors that allow the user
to specify whether or not to detect GZIP compressed files
and automatically decompress them during reading.

Also do note that the size detection will not work
correctly for files larger than 4GB.

Signed-off-by: Martin Schroeder <martin.h.schroeder@intel.com>
@HedAurabesh
Copy link
Contributor Author

The link to the associated Jenkins pull request is:

jenkinsci/jenkins#549

this(file, charset, completed, false);
}

public LargeText(final File file, Charset charset, boolean completed, boolean transparentUnGZIP) {
Copy link
Member

Choose a reason for hiding this comment

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

BTW the corresponding Unix command is gunzip, which might be a more familiar term (or not).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mhhm, somehow "transparentGunzip" also looks strange. How about: "transparentGzipInflate" or "transparentGZIPInflate"?

But I'm also okay with the first solution. Just reply with what you think is the best solution, and I will change it accordingly.

This includes corrected typos, indendation and variable names.

The most important change is to removed the duplicated
functionality of FileSession inside GzipAwareSession.

Added copyright as per company policy.

Signed-off-by: Martin Schroeder <martin.h.schroeder@intel.com>
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