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

Created gzip files are corrupt #18

Open
BrandonLive opened this issue Aug 5, 2015 · 1 comment
Open

Created gzip files are corrupt #18

BrandonLive opened this issue Aug 5, 2015 · 1 comment

Comments

@BrandonLive
Copy link

If I run zopfli.exe (with same default options, or explicitly specifying gzip), I get a functional gzip compressed file. If I use this task (default options, or explicitly specifying gzip), I get a non-functional file that is 11 bytes longer and fails gzip CRC checks.

The content of the working and non-working files appears identical except that the one generated by this task has errant newlines throughout (the zopfli.exe output has 3 lines, the grunt-zopfli output has 12. Looks like a problem in how you're writing the output stream to disk.

@BrandonLive
Copy link
Author

It looks like this is an issue with how Node/child_process interacts with stdout on Windows. After trying a few things to make that work, I gave up and changed grunt-zopfli to just let zopfli create a new file (with ".gz" appended), then fs.rename that to destpath (after deleting any existing file there).

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

No branches or pull requests

1 participant