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 gzip calculation #1

Closed
wants to merge 1 commit into from

Conversation

twolfson
Copy link

@twolfson twolfson commented Oct 3, 2015

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:

  • Added calculate_gzip option
  • Added gzip calculation/output via status bar

Notes:

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:

@FichteFoll
Copy link
Member

FichteFoll commented Feb 10, 2020

I just went through some of the open issues and implemented this slightly differently because I forgot to check for open pull requests first. My solution has some advantages and some minor disadvantages. Most notably it's simpler, so I'll close this PR. Sorry about that. Feel free to propose a PR on top of the current master if you believe it can be improved.

63bac23

@FichteFoll FichteFoll closed this Feb 10, 2020
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

2 participants