Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple months ago I had a similar idea for this package except it was focused around getting both the normal size and gzip size for files.
https://gist.github.com/twolfson/4109692/revisions#diff-d680e8a854a7cbad6d490c445cba2ebaR171
Today I finally decided to write it. However, during my research I happily found this module =)
Unfortunately, it lacks gzip support (which is one of the key features I wanted). The reasoning is that as a web developer, I want to sometimes preview how big a script is going to be in production (where we use gzip).
This PR adds in gzip support to the repo via an opt-in flag. In this PR:
calculate_gzip
optionNotes:
I did some research on gzip to see if there was any more performant way of doing this estimation. Unfortunately, gzip is smart -- meaning we have to walk through it to get a decent measurement. Here is some nice reference material for those unfamiliar: