-
Notifications
You must be signed in to change notification settings - Fork 55
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
publish compressed files ? #185
Comments
minecraft-data now takes up over 145MB of space (149360KB) on disk when installed. A way to easily shrink this size without any extra code would be to minify the JSON data before publishing to npm. (Remove the extra new lines that make it human read-able.) This alone shrinks it down to around 115MB (116788KB) Using an actual compression on top of this would be an improvement as well. |
Files are already published compressed. Npm does that by default
Is your goal to decrease your local node modules space use ?
…On Fri, Nov 17, 2023, 19:15 William Gaylord ***@***.***> wrote:
minecraft-data now takes up over 145MB of space (149360KB) on disk when
installed. A way to easily shrink this size without and extra code would be
to minify the JSON data before publishing to nom. (Remove the extra new
lines that make it human read-able.) This alone shrinks it down to around
115MB (116788KB) Using an actual compression on top of this would be an
improvement as well.
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437TIL6LR6MUFZTGVWULYE6SSRAVCNFSM5S7ADWLKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBRGY4DQMJTGY4A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thats what I assumed this issue was about, was just giving my input. |
Yep, that was the original idea of the issue: PrismarineJS/node-minecraft-protocol#978 (comment) |
Ah right, forgot I had opened this |
https://www.npmjs.com/package/node-stream-zip
|
Yeah, publishing a zip seems to be best. node-stream-zip doesn't support sync but it seems https://github.com/cthackers/adm-zip does. If anyone wants to do it the API seems simple to use also. |
Another way would be to compress file independently. Kind of same as zip really Would just need to try out when to run this, eg pre publish post install etc and see loading time and if that breaks web |
tried there #346 |
it would reduce the size of nmd package on disk
decompression cost at run time would probably be minimal
The text was updated successfully, but these errors were encountered: