-
Notifications
You must be signed in to change notification settings - Fork 1k
compress files in virtual file system (#885) #1115
Conversation
Would be cool to see some before and after data on this |
This PR enables compression of Virtual File System table and Zip/Brotli compression of each individual file content.
|
68b9521
to
5914e56
Compare
If possible, IMO we can try to make it possible to compress the entire binary, not only the virtual file system. |
@erossignon Nice work here! BTW I have linked the pr that was asking for zip executables, what do you think about them? I know https://www.npmjs.com/package/caxa works in this way for example |
Yes, The executable that we use from pkg_fetch is far too big, It should be compiled with minimum ICU to significantly reduce its size. then we could had some options in pkg to reference or add the ICU as a external module ( optional) I have no idea how to compress the entire executable further... if you have a idea, let me know. |
9eb4d2a
to
6560ded
Compare
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.
1078576
to
d8021e8
Compare
I'd like to wait until we cut a release of pkg that's fetching from pkg-fetch properly. |
OK, I'll keep rebasing and keep the code up to date until new version of pkg-fetch is fully integrated |
d8021e8
to
751d24f
Compare
751d24f
to
d217bbd
Compare
UPX might be an option See: Relevant quotes
|
d217bbd
to
5271379
Compare
9bd7a83
to
edc8c5e
Compare
@leerob can we incorporated to a 5.1 release ? |
5.1 is out, but we can get this in 5.2! 😁 |
On an unrelated note, there seems to be a typo on a few lines in the commits, both in code and documentation, using Brolti instead of Brotli. It might cause some confusion among users. |
@erossignon Could you fix the typos? |
edc8c5e
to
bb1821b
Compare
let's go |
This could mean that the size of the executable could change at runtime somehow? Strange! (your technique for relative offset, reads the executable size each time to find the start of the prelude by subtracting the payload size. ) This could also mean that one asset is read by chunks randomly (direct file access, set position then read ) rather than as a whole. This behavior could be studied in a subsequent Pull Request, and should not prevent this PR to merged to main branch. At the end the compress options is not on by default. |
…em (vercel#1115)"" This reverts commit 52ddf23.
…em (vercel#1115)"" This reverts commit 52ddf23.
…em (vercel#1115)"" This reverts commit 52ddf23.
Fixes #885