You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
402 B
16 lines
402 B
exports.patch = function(Buffers) {
|
|
Buffers.prototype.skip = function (i) {
|
|
if (i == 0) {
|
|
return;
|
|
} else if (i == this.length) {
|
|
this.buffers = [];
|
|
this.length = 0;
|
|
return;
|
|
}
|
|
var pos = this.pos(i);
|
|
this.buffers = this.buffers.slice(pos.buf);
|
|
this.buffers[0].length -= pos.offset;
|
|
this.buffers[0].offset += pos.offset;
|
|
this.length -= i;
|
|
};
|
|
};
|
|
|