Permalink
Browse files

Merge pull request #81 from pornel/fwrite

Faster stdout writing
  • Loading branch information...
lvandeve committed Jul 7, 2017
2 parents 6818a08 + 033a562 commit 64c6f362fefd56dccbf31906fdb3e31f6a6faf80
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/zopfli/zopfli_bin.c
@@ -114,14 +114,11 @@ static void CompressFile(const ZopfliOptions* options,
if (outfilename) {
SaveFile(outfilename, out, outsize);
} else {
size_t i;
#if _WIN32
/* Windows workaround for stdout output. */
_setmode(_fileno(stdout), _O_BINARY);
#endif
for (i = 0; i < outsize; i++) {
printf("%c", out[i]);
}
fwrite(out, 1, outsize, stdout);
}
free(out);

0 comments on commit 64c6f36

Please sign in to comment.