-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: support gzip encoding requests & use GZIPInputStream #1104
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1104 +/- ##
=======================================
Coverage 69.71% 69.71%
=======================================
Files 20 20
Lines 1806 1806
=======================================
Hits 1259 1259
Misses 547 547 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a valuable addition. I'd like a second pair of eyes, though. According to the Android docs, this is available from API level 1 (https://developer.android.com/reference/java/util/zip/GZIPInputStream)
IMHO this could fit into the 9.1.0 release, too. |
While I think this is okay to be in a minor release, @erisu already made a declaration for 9.1 so I think master should remain frozen. |
If this PR can fit in the minor release, then it is still acceptable to be merged into the master branch, at this time. When a discussion thread is made for a release, PRs can still be merged into the master branch as long as the PRs are fitting for that target release. Only when a vote thread is created is when the master branch is completely frozen and no PRs should be merged in temporarily. This is so that if the vote fails for any reason, it can be easily corrected and resubmitted. (Even after a vote failure, more PRs could be merged in for the targeted release. hehe) |
This improves the energy efficiency of cordova-android by applying the Reduce Size Energy Pattern for mobile applications.
The energy pattern was applied in CordovaResourceApi.java. The general idea is when receiving data from an URLConnection or subclasses, if possible, receive the data compressed by GZIP scheme. In this specific case, when receiving data from the conn variable, request for the data to be compressed.