Lines Matching refs:encoding

258         encoding: options.encoding || 'utf8'
6277 function StringChunk(data, encoding) {
6281 this._encoding = encoding;
6468 this.encoding = null;
6545 write: function write(data, encoding, callback) {
6554 if (encoding instanceof Function) {
6555 callback = encoding;
6556 encoding = 'utf8';
6586 chunk = new StringChunk(data, encoding);
6675 end: function end(chunk, encoding, callback) {
6693 this.write(chunk, encoding, writeComplete);
6730 setEncoding: function setEncoding(encoding) {
6732 this.encoding = encoding;
6792 this._encoding = options && options.encoding || 'utf8'; // where in the buffer we are at
7484 encoding: 'UTF-8',
7608 value: function setEncoding(encoding) {
7609 return this.stream.setEncoding(encoding);
25573 value: function _transform(row, encoding, cb) {
26196 encoding: 'utf8'
26281 _this.decoder = new string_decoder_1.StringDecoder(parserOptions.encoding);
26322 value: function _transform(data, encoding, done) {
26577 this.encoding = 'utf8';
38691 SafeBuffer.alloc = function (size, fill, encoding) {
38699 if (typeof encoding === 'string') {
38700 buf.fill(fill, encoding);
38913 function alloc(size, fill, encoding) {
38924 …return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size)…
38935 Buffer.alloc = function (size, fill, encoding) {
38936 return alloc(size, fill, encoding);
38960 function fromString(string, encoding) {
38961 if (typeof encoding !== 'string' || encoding === '') {
38962 encoding = 'utf8';
38965 if (!Buffer.isEncoding(encoding)) {
38966 throw new TypeError('Unknown encoding: ' + encoding);
38969 var length = byteLength(string, encoding) | 0;
38971 var actual = buf.write(string, encoding);
39092 Buffer.isEncoding = function isEncoding(encoding) {
39093 switch (String(encoding).toLowerCase()) {
39152 function byteLength(string, encoding) {
39172 switch (encoding) {
39199 encoding = ('' + encoding).toLowerCase();
39207 function slowToString(encoding, start, end) {
39241 if (!encoding) encoding = 'utf8';
39244 switch (encoding) {
39269 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
39270 encoding = (encoding + '').toLowerCase();
39433 function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
39438 encoding = byteOffset;
39464 val = Buffer.from(val, encoding);
39474 return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
39486 return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
39492 function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
39497 if (encoding !== undefined) {
39498 encoding = String(encoding).toLowerCase();
39500 …if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16l…
39554 Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
39555 return this.indexOf(val, byteOffset, encoding) !== -1;
39558 Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
39559 return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
39562 Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
39563 return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
39615 Buffer.prototype.write = function write(string, offset, length, encoding) {
39618 encoding = 'utf8';
39622 encoding = offset;
39630 if (encoding === undefined) encoding = 'utf8';
39632 encoding = length;
39646 if (!encoding) encoding = 'utf8';
39650 switch (encoding) {
39676 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
39677 encoding = ('' + encoding).toLowerCase();
40326 Buffer.prototype.fill = function fill(val, start, end, encoding) {
40330 encoding = start;
40334 encoding = end;
40338 if (encoding !== undefined && typeof encoding !== 'string') {
40342 if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
40343 throw new TypeError('Unknown encoding: ' + encoding);
40349 if (encoding === 'utf8' && code < 128 || encoding === 'latin1') {
40377 var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
49251 HashBase.prototype._transform = function (chunk, encoding, callback) {
49255 this.update(chunk, encoding);
49275 HashBase.prototype.update = function (data, encoding) {
49278 if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding); // consume data
49311 HashBase.prototype.digest = function (encoding) {
49317 if (encoding !== undefined) digest = digest.toString(encoding); // reset state
52023 newBufferFrom: function newBufferFrom(data, encoding) {
52025 return Buffer.from(data, encoding);
52033 return new Buffer(data, encoding);
70517 module.exports = function (thing, encoding, name) {
70521 return Buffer.from(thing, encoding);
71617 PassThrough.prototype._transform = function (chunk, encoding, cb) {
71782 this.encoding = null;
71784 if (options.encoding) {
71786 this.decoder = new StringDecoder(options.encoding);
71787 this.encoding = options.encoding;
71844 Readable.prototype.push = function (chunk, encoding) {
71850 encoding = encoding || state.defaultEncoding;
71852 if (encoding !== state.encoding) {
71853 chunk = Buffer.from(chunk, encoding);
71854 encoding = '';
71863 return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
71871 function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
71898 if (state.decoder && !encoding) {
71951 …this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffe…
72887 Transform.prototype.push = function (chunk, encoding) {
72889 return Duplex.prototype.push.call(this, chunk, encoding);
72902 Transform.prototype._transform = function (chunk, encoding, cb) {
72906 Transform.prototype._write = function (chunk, encoding, cb) {
72910 ts.writeencoding = encoding;
72983 function WriteReq(chunk, encoding, cb) {
72985 this.encoding = encoding;
73242 Writable.prototype.write = function (chunk, encoding, cb) {
73252 if (typeof encoding === 'function') {
73253 cb = encoding;
73254 encoding = null;
73257 if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
73261 ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
73279 Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
73281 if (typeof encoding === 'string') encoding = encoding.toLowerCase();
73282 …utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_E…
73283 this._writableState.defaultEncoding = encoding;
73297 function decodeChunk(state, chunk, encoding) {
73299 chunk = Buffer.from(chunk, encoding);
73317 function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
73319 var newChunk = decodeChunk(state, chunk, encoding);
73323 encoding = 'buffer';
73338 encoding: encoding,
73352 doWrite(stream, state, false, len, chunk, encoding, cb);
73358 function doWrite(stream, state, writev, len, chunk, encoding, cb) {
73363 …f (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
73477 var encoding = entry.encoding;
73480 doWrite(stream, state, false, len, chunk, encoding, cb);
73499 Writable.prototype._write = function (chunk, encoding, cb) {
73505 Writable.prototype.end = function (chunk, encoding, cb) {
73511 encoding = null;
73512 } else if (typeof encoding === 'function') {
73513 cb = encoding;
73514 encoding = null;
73517 if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
75429 SafeBuffer.alloc = function (size, fill, encoding) {
75437 if (typeof encoding === 'string') {
75438 buf.fill(fill, encoding);
75509 Safer.alloc = function (size, fill, encoding) {
75522 } else if (typeof encoding === 'string') {
75523 buf.fill(fill, encoding);
75933 encoding: undefined,
77146 this.xmlDecl.encoding = value;
79167 PassThrough.prototype._transform = function (chunk, encoding, cb) {
79338 this.encoding = null;
79340 if (options.encoding) {
79342 this.decoder = new StringDecoder(options.encoding);
79343 this.encoding = options.encoding;
79394 Readable.prototype.push = function (chunk, encoding) {
79400 encoding = encoding || state.defaultEncoding;
79402 if (encoding !== state.encoding) {
79403 chunk = Buffer.from(chunk, encoding);
79404 encoding = '';
79413 return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
79421 function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
79445 if (state.decoder && !encoding) {
79503 this._readableState.encoding = enc;
80352 Transform.prototype.push = function (chunk, encoding) {
80354 return Duplex.prototype.push.call(this, chunk, encoding);
80367 Transform.prototype._transform = function (chunk, encoding, cb) {
80371 Transform.prototype._write = function (chunk, encoding, cb) {
80375 ts.writeencoding = encoding;
80456 function WriteReq(chunk, encoding, cb) {
80458 this.encoding = encoding;
80717 Writable.prototype.write = function (chunk, encoding, cb) {
80727 if (typeof encoding === 'function') {
80728 cb = encoding;
80729 encoding = null;
80732 if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
80736 ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
80755 Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
80757 if (typeof encoding === 'string') encoding = encoding.toLowerCase();
80758 …e', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown …
80759 this._writableState.defaultEncoding = encoding;
80763 function decodeChunk(state, chunk, encoding) {
80765 chunk = Buffer.from(chunk, encoding);
80783 function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
80785 var newChunk = decodeChunk(state, chunk, encoding);
80789 encoding = 'buffer';
80804 encoding: encoding,
80818 doWrite(stream, state, false, len, chunk, encoding, cb);
80824 function doWrite(stream, state, writev, len, chunk, encoding, cb) {
80829 …if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite…
80944 var encoding = entry.encoding;
80947 doWrite(stream, state, false, len, chunk, encoding, cb);
80966 Writable.prototype._write = function (chunk, encoding, cb) {
80972 Writable.prototype.end = function (chunk, encoding, cb) {
80978 encoding = null;
80979 } else if (typeof encoding === 'function') {
80980 cb = encoding;
80981 encoding = null;
80984 if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
81333 var isEncoding = Buffer.isEncoding || function (encoding) {
81334 encoding = '' + encoding;
81336 switch (encoding && encoding.toLowerCase()) {
81404 function StringDecoder(encoding) {
81405 this.encoding = normalizeEncoding(encoding);
81408 switch (this.encoding) {
81462 return this.lastChar.toString(this.encoding, 0, this.lastTotal);
81548 return this.lastChar.toString(this.encoding, 0, this.lastTotal);
81641 return buf.toString(this.encoding);