mafintosh / tar-stream

tar-stream is a streaming tar parser and generator.
MIT License
406 stars 92 forks source link

File encoding? #70

Closed aaricpittman closed 6 years ago

aaricpittman commented 7 years ago

Why does this code, https://github.com/aaricpittman/yarn-pack-test/blob/master/stand-alone.js, corrupt the image files when the files are read with the 'binary' encoding and fine when I don't specify the encoding?

mafintosh commented 6 years ago

tar-stream defaults to utf8 strings if you pass the file body as a string. pass it as a buffer instead