Closed Kitsumi closed 5 years ago
@Kitsumi Using encoding: "utf-8"
makes Node.js read the file as UTF-8 text, which is not what you want when reading a binary file. Just leave out the encoding:
bit and things should work fine. :)
Oof, you're right, I didn't see that at first! I guess doing code super late at night isn't a good idea. Thanks so much.
I'm trying to decompress data from the reddit comment archives in a stream, but it doesn't seem to work...
I checked the file, and it downloaded properly, and I can also extract it with
unxz file
andxz -d file