bandwidth-throttle-stream
bandwidth-throttle-stream copied to clipboard
Can't use a file stream
const readStream = fs.createReadStream(inFile)
const writeStream = fs.createWriteStream(file)
const bandwidthThrottleGroup = createBandwidthThrottleGroup({
bytesPerSecond: 500000
})
const throttleStream = bandwidthThrottleGroup.createBandwidthThrottle(500000)
read.pipe(throttleStream).pipe(writeStream)
will always RangeError: offset is out of bounds.