I'm trying to stream a compressed torrent file and pipe it to a decompressor.
node stream.js | bzip2 -dkc
It works fine for some files but fails for some other files - conspicuously it fails for files with sizes > 4GB:
The failure is, that the readStream never finishes. The readStream never emits end and the file in /tmp/torrent-stream/... remains incomplete. Only very little data is missing at the end of the file.
No error get's emitted by the readStream.
You can run this script to reproduce (the torrent is about reddit comments):
I'm trying to stream a compressed torrent file and pipe it to a decompressor.
node stream.js | bzip2 -dkc
It works fine for some files but fails for some other files - conspicuously it fails for files with sizes > 4GB: The failure is, that the readStream never finishes. The readStream never emits
end
and the file in /tmp/torrent-stream/... remains incomplete. Only very little data is missing at the end of the file. Noerror
get's emitted by the readStream.You can run this script to reproduce (the torrent is about reddit comments):
I tried to download the problematic file with a torrent client and it worked.