(buf, start, end)
| 113562 | return out; |
| 113563 | } |
| 113564 | function utf16leSlice(buf, start, end) { |
| 113565 | var bytes = buf.slice(start, end); |
| 113566 | var res = ""; |
| 113567 | // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) |
| 113568 | for(var i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); |
| 113569 | return res; |
| 113570 | } |
| 113571 | Buffer.prototype.slice = function slice(start, end) { |
| 113572 | var len = this.length; |
| 113573 | start = ~~start; |