You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bulk writing/buffering on writeable streams is possible in Node. Using the cork() and uncork() API calls, one can specify a range where bulk writes will occur.
writable.cork()
Using the cork() method, the end user modifies the behaviour of writeable streams to buffering. Consequently, streams should accept new writes as long as it does not exceed the highWaterMark option passed to Writable().
writable.uncork()
uncork() resets the behaviour and attempts to bulk-write all buffered writes to the underlying resource.
Flushing of buffered data can be also achieved by calling the .end() method.