bandwidth-throttle-stream icon indicating copy to clipboard operation
bandwidth-throttle-stream copied to clipboard

Can't use a file stream

Open guoh27 opened this issue 3 years ago • 0 comments

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.

guoh27 avatar Jun 14 '22 07:06 guoh27