-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Mime] But smaller ;) #339
Comments
Thanks, @TheThing (oh hey! :) - alas that package really needs to be browser compatible (personally, that's where I'm using it most), so (sadly) will have to pass on this approach. Still, it be good to take another pass over the current list and do some more pruning. There're quite a few pretty exotic MIME types still included, which we IMHO could lose without causing too much upset... will create another task/issue when I get back home |
That's actually really cool and I think I kinda agree. I do like the mime library and if it gets further pruning. I figured since you are pruning you might also wanna keep that in mind. Here's the issue in question: jshttp/mime-db#194 |
Used the wrong issue number in the commit log, but just FYI: 5a51f7d 👍 |
So I saw your thi-ng/mime which is an awesome reduced set of the infamous huge mime database and was very happy about it. However I still felt we could do better so I took the "generated.ts" file and uhmm... compressed it and managed to reduce its final size in half :)
Original: 16.3KB
Compressed: 5.52KB
I did this for my package Flaska which was inspired by Bottle.py as a single-file module http package. I wanted mime-type support in it and including a big database of 17KB would have cause quite an impact but this way, the impact was kept smaller.
I figured I'd throw this out there in case you're interested in cutting the mime database size in half ;)
Here's the entire code and database in compressed format (not browser compatible so that might be a dealbreaker):
Just wanted to share this trick with you that I used and am using for large static data. Feel free to close this issue.
The text was updated successfully, but these errors were encountered: