Skip to content

Commit

Permalink
Merge branch 'perf-offset' of https://github.com/Nibbler999/bl into v…
Browse files Browse the repository at this point in the history
…1.2-dev
  • Loading branch information
mcollina committed Dec 21, 2016
2 parents 6afca3b + 84bcb41 commit b9deb27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bl.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ util.inherits(BufferList, DuplexStream)

BufferList.prototype._offset = function _offset (offset) {
var tot = 0, i = 0, _t
if (offset === 0) return [ 0, 0 ]
for (; i < this._bufs.length; i++) {
_t = tot + this._bufs[i].length
if (offset < _t)
Expand Down

0 comments on commit b9deb27

Please sign in to comment.