-
Notifications
You must be signed in to change notification settings - Fork 186
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
rice append doesn't append compressed zip contents, but plain text? #84
Comments
If I create my own zip and do this, it seems to work, regardless of what
So it seems there should be just some step in |
& there are some issues in regards how folders are added to the archive. Unpacking the binary file doesn't work nicely if the data is appended with the rice command. Boxes/folders are unpacked as 0 byte files. |
I just noticed this as well when my compiled variant was 115mb and the zip appended executable was 137. The files, alone, are 130mb, and when zipped are 11mb (yay xml...). |
Doing some basic research, I think this line (https://github.com/GeertJohan/go.rice/blob/master/rice/append.go#L111) is missing a follow up line of
I added that and rebuilt and the appended file now is 19mb (8 for the app pre-append + the 11 I expect) so it looks to, file size, work. However, running the app throws several errors and truncates the embedded files, so clearly the reading back of a compressed archive is also incompatible still.
|
@jeffminard-ck - I suggest you to try my workaround in comment 2 with zip -A and let me know if you can bypass append and end up with a working app :) |
I did eventually try that and ended up with the same results. The readback code I could find doesn't seem to mention |
Hello I ran into the same problem. The size of the executable file grows too much because there is no compress option, I have made some changes that allow deflate to be used in the boxes, both as appended and embedded. I have found that the main problem was due to a problem in the implementation of the algorithm in flate If you use rc.Read to read the content in a compressed file you will get an EOF error. Then I use ioutil.ReadAll it doesn't generate the error and you don't need make the slice, and to make sure the uncompressed file content is correct it calculate CRC and compare with the store one. There is a new flag "/c" that allows compress. If the flag is not used the previous process is generated. The boxes are compatible with previous version without changes I have made a fork on https://github.com/wladiz2001/go.rice/ You can review it and if there is no problem you can merge it |
Appending two boxes (templates and assets folder), I can inspect the binary files and realize that the appended data is not compressed at all:
I'm expecting the zip file would be compressed which doesn't seem to be the case...
The text was updated successfully, but these errors were encountered: