play-dl-fix/docs/interfaces/_internal_.Buffer.html
2021-11-17 12:40:22 +05:30

718 lines
359 KiB
HTML

<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Buffer | play-dl</title><meta name="description" content="Documentation for play-dl"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">play-dl</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">play-dl</a></li><li><a href="../modules/_internal_.html">&lt;internal&gt;</a></li><li><a href="_internal_.Buffer.html">Buffer</a></li></ul><h1>Interface Buffer</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><ul class="tsd-hierarchy"><li><span class="target">Buffer</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section tsd-is-inherited tsd-is-external"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#BYTES_PER_ELEMENT" class="tsd-kind-icon">BYTES_<wbr/>PER_<wbr/>ELEMENT</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#_toStringTag_" class="tsd-kind-icon">[to<wbr/>String<wbr/>Tag]</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#buffer" class="tsd-kind-icon">buffer</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#byteLength" class="tsd-kind-icon">byte<wbr/>Length</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#byteOffset" class="tsd-kind-icon">byte<wbr/>Offset</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#length" class="tsd-kind-icon">length</a></li></ul></section><section class="tsd-index-section tsd-is-external"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#_iterator_" class="tsd-kind-icon">[iterator]</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#at" class="tsd-kind-icon">at</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#compare" class="tsd-kind-icon">compare</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#copy" class="tsd-kind-icon">copy</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#copyWithin" class="tsd-kind-icon">copy<wbr/>Within</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#entries" class="tsd-kind-icon">entries</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#equals" class="tsd-kind-icon">equals</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#every" class="tsd-kind-icon">every</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#fill" class="tsd-kind-icon">fill</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#filter" class="tsd-kind-icon">filter</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#find" class="tsd-kind-icon">find</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#findIndex" class="tsd-kind-icon">find<wbr/>Index</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#forEach" class="tsd-kind-icon">for<wbr/>Each</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#includes" class="tsd-kind-icon">includes</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#indexOf" class="tsd-kind-icon">index<wbr/>Of</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#join" class="tsd-kind-icon">join</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#keys" class="tsd-kind-icon">keys</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#lastIndexOf" class="tsd-kind-icon">last<wbr/>Index<wbr/>Of</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#map" class="tsd-kind-icon">map</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigInt64BE" class="tsd-kind-icon">read<wbr/>Big<wbr/>Int64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigInt64LE" class="tsd-kind-icon">read<wbr/>Big<wbr/>Int64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigUInt64BE" class="tsd-kind-icon">read<wbr/>BigUInt64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigUInt64LE" class="tsd-kind-icon">read<wbr/>BigUInt64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readDoubleBE" class="tsd-kind-icon">read<wbr/>DoubleBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readDoubleLE" class="tsd-kind-icon">read<wbr/>DoubleLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readFloatBE" class="tsd-kind-icon">read<wbr/>FloatBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readFloatLE" class="tsd-kind-icon">read<wbr/>FloatLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt16BE" class="tsd-kind-icon">read<wbr/>Int16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt16LE" class="tsd-kind-icon">read<wbr/>Int16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt32BE" class="tsd-kind-icon">read<wbr/>Int32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt32LE" class="tsd-kind-icon">read<wbr/>Int32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt8" class="tsd-kind-icon">read<wbr/>Int8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readIntBE" class="tsd-kind-icon">read<wbr/>IntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readIntLE" class="tsd-kind-icon">read<wbr/>IntLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt16BE" class="tsd-kind-icon">readUInt16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt16LE" class="tsd-kind-icon">readUInt16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt32BE" class="tsd-kind-icon">readUInt32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt32LE" class="tsd-kind-icon">readUInt32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt8" class="tsd-kind-icon">readUInt8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUIntBE" class="tsd-kind-icon">readUIntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUIntLE" class="tsd-kind-icon">readUIntLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#reduce" class="tsd-kind-icon">reduce</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#reduceRight" class="tsd-kind-icon">reduce<wbr/>Right</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#reverse" class="tsd-kind-icon">reverse</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#set" class="tsd-kind-icon">set</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#slice" class="tsd-kind-icon">slice</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#some" class="tsd-kind-icon">some</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#sort" class="tsd-kind-icon">sort</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#subarray" class="tsd-kind-icon">subarray</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#swap16" class="tsd-kind-icon">swap16</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#swap32" class="tsd-kind-icon">swap32</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#swap64" class="tsd-kind-icon">swap64</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#toJSON" class="tsd-kind-icon">toJSON</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#toLocaleString" class="tsd-kind-icon">to<wbr/>Locale<wbr/>String</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#toString" class="tsd-kind-icon">to<wbr/>String</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#valueOf" class="tsd-kind-icon">value<wbr/>Of</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#values" class="tsd-kind-icon">values</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#write" class="tsd-kind-icon">write</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigInt64BE" class="tsd-kind-icon">write<wbr/>Big<wbr/>Int64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigInt64LE" class="tsd-kind-icon">write<wbr/>Big<wbr/>Int64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigUInt64BE" class="tsd-kind-icon">write<wbr/>BigUInt64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigUInt64LE" class="tsd-kind-icon">write<wbr/>BigUInt64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeDoubleBE" class="tsd-kind-icon">write<wbr/>DoubleBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeDoubleLE" class="tsd-kind-icon">write<wbr/>DoubleLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeFloatBE" class="tsd-kind-icon">write<wbr/>FloatBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeFloatLE" class="tsd-kind-icon">write<wbr/>FloatLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt16BE" class="tsd-kind-icon">write<wbr/>Int16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt16LE" class="tsd-kind-icon">write<wbr/>Int16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt32BE" class="tsd-kind-icon">write<wbr/>Int32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt32LE" class="tsd-kind-icon">write<wbr/>Int32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt8" class="tsd-kind-icon">write<wbr/>Int8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeIntBE" class="tsd-kind-icon">write<wbr/>IntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeIntLE" class="tsd-kind-icon">write<wbr/>IntLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt16BE" class="tsd-kind-icon">writeUInt16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt16LE" class="tsd-kind-icon">writeUInt16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt32BE" class="tsd-kind-icon">writeUInt32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt32LE" class="tsd-kind-icon">writeUInt32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt8" class="tsd-kind-icon">writeUInt8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUIntBE" class="tsd-kind-icon">writeUIntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUIntLE" class="tsd-kind-icon">writeUIntLE</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="BYTES_PER_ELEMENT" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> BYTES_<wbr/>PER_<wbr/>ELEMENT</h3><div class="tsd-signature tsd-kind-icon">BYTES_<wbr/>PER_<wbr/>ELEMENT<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from Uint8Array.BYTES_PER_ELEMENT</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2042</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The size in bytes of each element in the array.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="_toStringTag_" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> [to<wbr/>String<wbr/>Tag]</h3><div class="tsd-signature tsd-kind-icon">[to<wbr/>String<wbr/>Tag]<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;Uint8Array&quot;</span></div><aside class="tsd-sources"><p>Inherited from Uint8Array.__@toStringTag@24</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:282</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="buffer" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> buffer</h3><div class="tsd-signature tsd-kind-icon">buffer<span class="tsd-signature-symbol">:</span> <a href="../modules/_internal_.html#ArrayBufferLike" class="tsd-signature-type" data-tsd-kind="Type alias">ArrayBufferLike</a></div><aside class="tsd-sources"><p>Inherited from Uint8Array.buffer</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2047</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The ArrayBuffer instance referenced by the array.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="byteLength" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> byte<wbr/>Length</h3><div class="tsd-signature tsd-kind-icon">byte<wbr/>Length<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from Uint8Array.byteLength</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2052</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The length in bytes of the array.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="byteOffset" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> byte<wbr/>Offset</h3><div class="tsd-signature tsd-kind-icon">byte<wbr/>Offset<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from Uint8Array.byteOffset</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2057</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The offset in bytes of the array.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="length" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> length</h3><div class="tsd-signature tsd-kind-icon">length<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from Uint8Array.length</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2156</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The length of the array.</p>
</div></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-external"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="_iterator_" class="tsd-anchor"></a><h3>[iterator]</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">[iterator]<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.__@iterator@39</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:279</li></ul></aside><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="at" class="tsd-anchor"></a><h3>at</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">at<span class="tsd-signature-symbol">(</span>index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.at</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:86</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Takes an integer value and returns the item at that index,
allowing for positive and negative integers.
Negative integers count back from the last item in the array.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>index: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="compare" class="tsd-anchor"></a><h3>compare</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">compare<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a>, targetStart<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, targetEnd<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, sourceStart<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, sourceEnd<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:707</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Compares <code>buf</code> with <code>target</code> and returns a number indicating whether <code>buf</code>comes before, after, or is the same as <code>target</code> in sort order.
Comparison is based on the actual sequence of bytes in each <code>Buffer</code>.</p>
</div><div><ul>
<li><code>0</code> is returned if <code>target</code> is the same as <code>buf</code></li>
<li><code>1</code> is returned if <code>target</code> should come <em>before</em><code>buf</code> when sorted.</li>
<li><code>-1</code> is returned if <code>target</code> should come <em>after</em><code>buf</code> when sorted.</li>
</ul>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;ABC&#39;</span><span class="hl-0">);</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;BCD&#39;</span><span class="hl-0">);</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf3</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;ABCD&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf3</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf3</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">([</span><span class="hl-3">buf1</span><span class="hl-0">, </span><span class="hl-3">buf2</span><span class="hl-0">, </span><span class="hl-3">buf3</span><span class="hl-0">].</span><span class="hl-7">sort</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-3">compare</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: [ &lt;Buffer 41 42 43&gt;, &lt;Buffer 41 42 43 44&gt;, &lt;Buffer 42 43 44&gt; ]</span><br/><span class="hl-5">// (This result is equal to: [buf1, buf3, buf2].)</span>
</code></pre>
<p>The optional <code>targetStart</code>, <code>targetEnd</code>, <code>sourceStart</code>, and <code>sourceEnd</code>arguments can be used to limit the comparison to specific ranges within <code>target</code>and <code>buf</code> respectively.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">, </span><span class="hl-8">7</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">, </span><span class="hl-8">9</span><span class="hl-0">]);</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">5</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">, </span><span class="hl-8">7</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">, </span><span class="hl-8">9</span><span class="hl-0">, </span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">, </span><span class="hl-8">9</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">compare</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1</span>
</code></pre>
<p><code>ERR_OUT_OF_RANGE</code> is thrown if <code>targetStart &lt; 0</code>, <code>sourceStart &lt; 0</code>,<code>targetEnd &gt; target.byteLength</code>, or <code>sourceEnd &gt; source.byteLength</code>.</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.13</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>target: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A <code>Buffer</code> or <a href="_internal_.Uint8Array.html">Uint8Array</a> with which to compare <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> targetStart: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> targetEnd: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> sourceStart: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> sourceEnd: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="copy" class="tsd-anchor"></a><h3>copy</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">copy<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a>, targetStart<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, sourceStart<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, sourceEnd<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:761</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Copies data from a region of <code>buf</code> to a region in <code>target</code>, even if the <code>target</code>memory region overlaps with <code>buf</code>.</p>
</div><div><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set"><code>TypedArray.prototype.set()</code></a> performs the same operation, and is available
for all TypedArrays, including Node.js <code>Buffer</code>s, although it takes
different function arguments.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-5">// Create two `Buffer` instances.</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">26</span><span class="hl-0">);</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">26</span><span class="hl-0">).</span><span class="hl-7">fill</span><span class="hl-0">(</span><span class="hl-4">&#39;!&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">let</span><span class="hl-0"> </span><span class="hl-3">i</span><span class="hl-0"> = </span><span class="hl-8">0</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0"> &lt; </span><span class="hl-8">26</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0">++) {</span><br/><span class="hl-0"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-0"> </span><span class="hl-3">buf1</span><span class="hl-0">[</span><span class="hl-3">i</span><span class="hl-0">] = </span><span class="hl-3">i</span><span class="hl-0"> + </span><span class="hl-8">97</span><span class="hl-0">;</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-5">// Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.</span><br/><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">copy</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">, </span><span class="hl-8">16</span><span class="hl-0">, </span><span class="hl-8">20</span><span class="hl-0">);</span><br/><span class="hl-5">// This is equivalent to:</span><br/><span class="hl-5">// buf2.set(buf1.subarray(16, 20), 8);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-4">&#39;ascii&#39;</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">25</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: !!!!!!!!qrst!!!!!!!!!!!!!</span>
</code></pre>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-5">// Create a `Buffer` and copy data from one region to an overlapping region</span><br/><span class="hl-5">// within the same `Buffer`.</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">26</span><span class="hl-0">);</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">let</span><span class="hl-0"> </span><span class="hl-3">i</span><span class="hl-0"> = </span><span class="hl-8">0</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0"> &lt; </span><span class="hl-8">26</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0">++) {</span><br/><span class="hl-0"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-0"> </span><span class="hl-3">buf</span><span class="hl-0">[</span><span class="hl-3">i</span><span class="hl-0">] = </span><span class="hl-3">i</span><span class="hl-0"> + </span><span class="hl-8">97</span><span class="hl-0">;</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">copy</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">, </span><span class="hl-8">10</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">());</span><br/><span class="hl-5">// Prints: efghijghijklmnopqrstuvwxyz</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.1.90</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>target: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A <code>Buffer</code> or <a href="_internal_.Uint8Array.html">Uint8Array</a> to copy into.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> targetStart: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> sourceStart: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> sourceEnd: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p>The number of bytes copied.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="copyWithin" class="tsd-anchor"></a><h3>copy<wbr/>Within</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">copy<wbr/>Within<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, end<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.copyWithin</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2068</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the this object after copying a section of the array identified by start and end
to the same array starting at position target</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>target: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If target is negative, it is treated as length+target where length is the
length of the array.</p>
</div></div></li><li><h5>start: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If start is negative, it is treated as length+start. If end is negative, it
is treated as length+end.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> end: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If not specified, length of the this object is used as its default value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="entries" class="tsd-anchor"></a><h3>entries</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">entries<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.entries</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2017</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates and returns an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterator</a> of <code>[index, byte]</code> pairs from the contents
of <code>buf</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-5">// Log the entire contents of a `Buffer`.</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">pair</span><span class="hl-0"> </span><span class="hl-2">of</span><span class="hl-0"> </span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">entries</span><span class="hl-0">()) {</span><br/><span class="hl-0"> </span><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">pair</span><span class="hl-0">);</span><br/><span class="hl-0">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// [0, 98]</span><br/><span class="hl-5">// [1, 117]</span><br/><span class="hl-5">// [2, 102]</span><br/><span class="hl-5">// [3, 102]</span><br/><span class="hl-5">// [4, 101]</span><br/><span class="hl-5">// [5, 114]</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v1.1.0</p>
</dd></dl></div><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="equals" class="tsd-anchor"></a><h3>equals</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">equals<span class="tsd-signature-symbol">(</span>otherBuffer<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:652</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns <code>true</code> if both <code>buf</code> and <code>otherBuffer</code> have exactly the same bytes,<code>false</code> otherwise. Equivalent to <code>buf.compare(otherBuffer) === 0</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;ABC&#39;</span><span class="hl-0">);</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;414243&#39;</span><span class="hl-0">, </span><span class="hl-4">&#39;hex&#39;</span><span class="hl-0">);</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf3</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;ABCD&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">equals</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">equals</span><span class="hl-0">(</span><span class="hl-3">buf3</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: false</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.13</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>otherBuffer: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A <code>Buffer</code> or <a href="_internal_.Uint8Array.html">Uint8Array</a> with which to compare <code>buf</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="every" class="tsd-anchor"></a><h3>every</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">every<span class="tsd-signature-symbol">(</span>predicate<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">unknown</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.every</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2078</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Determines whether all the members of an array satisfy the specified test.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>predicate: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">unknown</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to three arguments. The every method calls
the predicate function for each element in the array until the predicate returns a value
which is coercible to the Boolean value false, or until the end of the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5></li><li><h5>index: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>An object to which the this keyword can refer in the predicate function.
If thisArg is omitted, undefined is used as the this value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="fill" class="tsd-anchor"></a><h3>fill</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">fill<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, end<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.fill</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1855</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fills <code>buf</code> with the specified <code>value</code>. If the <code>offset</code> and <code>end</code> are not given,
the entire <code>buf</code> will be filled:</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-5">// Fill a `Buffer` with the ASCII character &#39;h&#39;.</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">b</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">50</span><span class="hl-0">).</span><span class="hl-7">fill</span><span class="hl-0">(</span><span class="hl-4">&#39;h&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">());</span><br/><span class="hl-5">// Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh</span>
</code></pre>
<p><code>value</code> is coerced to a <code>uint32</code> value if it is not a string, <code>Buffer</code>, or
integer. If the resulting integer is greater than <code>255</code> (decimal), <code>buf</code> will be
filled with <code>value &amp;#x26; 255</code>.</p>
<p>If the final write of a <code>fill()</code> operation falls on a multi-byte character,
then only the bytes of that character that fit into <code>buf</code> are written:</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-5">// Fill a `Buffer` with character that takes up two bytes in UTF-8.</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">5</span><span class="hl-0">).</span><span class="hl-7">fill</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u0222</span><span class="hl-4">&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: &lt;Buffer c8 a2 c8 a2 c8&gt;</span>
</code></pre>
<p>If <code>value</code> contains invalid characters, it is truncated; if no valid
fill data remains, an exception is thrown:</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">5</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">fill</span><span class="hl-0">(</span><span class="hl-4">&#39;a&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: &lt;Buffer 61 61 61 61 61&gt;</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">fill</span><span class="hl-0">(</span><span class="hl-4">&#39;aazz&#39;</span><span class="hl-0">, </span><span class="hl-4">&#39;hex&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: &lt;Buffer aa aa aa aa aa&gt;</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">fill</span><span class="hl-0">(</span><span class="hl-4">&#39;zz&#39;</span><span class="hl-0">, </span><span class="hl-4">&#39;hex&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws an exception.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The value with which to fill <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> end: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4><div><p>A reference to <code>buf</code>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="filter" class="tsd-anchor"></a><h3>filter</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">filter<span class="tsd-signature-symbol">(</span>predicate<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">any</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.filter</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2097</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the elements of an array that meet the condition specified in a callback function.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>predicate: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to three arguments. The filter method calls
the predicate function one time for each element in the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5></li><li><h5>index: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>An object to which the this keyword can refer in the predicate function.
If thisArg is omitted, undefined is used as the this value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="find" class="tsd-anchor"></a><h3>find</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">find<span class="tsd-signature-symbol">(</span>predicate<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obj<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.find</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2108</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the value of the first element in the array where predicate is true, and undefined
otherwise.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>predicate: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obj<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>find calls predicate once for each element of the array, in ascending
order, until it finds one where predicate returns true. If such an element is found, find
immediately returns that element value. Otherwise, find returns undefined.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obj<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5></li><li><h5>index: <span class="tsd-signature-type">number</span></h5></li><li><h5>obj: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If provided, it will be used as the this value for each invocation of
predicate. If it is not provided, undefined is used instead.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="findIndex" class="tsd-anchor"></a><h3>find<wbr/>Index</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">find<wbr/>Index<span class="tsd-signature-symbol">(</span>predicate<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obj<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.findIndex</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2119</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the index of the first element in the array where predicate is true, and -1
otherwise.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>predicate: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obj<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>find calls predicate once for each element of the array, in ascending
order, until it finds one where predicate returns true. If such an element is found,
findIndex immediately returns that element index. Otherwise, findIndex returns -1.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obj<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5></li><li><h5>index: <span class="tsd-signature-type">number</span></h5></li><li><h5>obj: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If provided, it will be used as the this value for each invocation of
predicate. If it is not provided, undefined is used instead.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="forEach" class="tsd-anchor"></a><h3>for<wbr/>Each</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">for<wbr/>Each<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.forEach</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2128</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Performs the specified action for each element in an array.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to three arguments. forEach calls the
callbackfn function one time for each element in the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5></li><li><h5>index: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="includes" class="tsd-anchor"></a><h3>includes</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">includes<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a>, byteOffset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.includes</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2047</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Equivalent to <code>buf.indexOf() !== -1</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;this is a buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">includes</span><span class="hl-0">(</span><span class="hl-4">&#39;this&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">includes</span><span class="hl-0">(</span><span class="hl-4">&#39;is&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">includes</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;a buffer&#39;</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">includes</span><span class="hl-0">(</span><span class="hl-8">97</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: true (97 is the decimal ASCII value for &#39;a&#39;)</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">includes</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;a buffer example&#39;</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: false</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">includes</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;a buffer example&#39;</span><span class="hl-0">).</span><span class="hl-7">slice</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">includes</span><span class="hl-0">(</span><span class="hl-4">&#39;this&#39;</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: false</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v5.3.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>What to search for.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> byteOffset: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div><p><code>true</code> if <code>value</code> was found in <code>buf</code>, <code>false</code> otherwise.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="indexOf" class="tsd-anchor"></a><h3>index<wbr/>Of</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">index<wbr/>Of<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a>, byteOffset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.indexOf</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1924</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>If <code>value</code> is:</p>
</div><div><ul>
<li>a string, <code>value</code> is interpreted according to the character encoding in<code>encoding</code>.</li>
<li>a <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a>, <code>value</code> will be used in its entirety.
To compare a partial <code>Buffer</code>, use <code>buf.slice()</code>.</li>
<li>a number, <code>value</code> will be interpreted as an unsigned 8-bit integer
value between <code>0</code> and <code>255</code>.</li>
</ul>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;this is a buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;this&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;is&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 2</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;a buffer&#39;</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: 8</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-8">97</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 8 (97 is the decimal ASCII value for &#39;a&#39;)</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;a buffer example&#39;</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;a buffer example&#39;</span><span class="hl-0">).</span><span class="hl-7">slice</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: 8</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">utf16Buffer</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u039a\u0391\u03a3\u03a3\u0395</span><span class="hl-4">&#39;</span><span class="hl-0">, </span><span class="hl-4">&#39;utf16le&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">utf16Buffer</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u03a3</span><span class="hl-4">&#39;</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-4">&#39;utf16le&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 4</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">utf16Buffer</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u03a3</span><span class="hl-4">&#39;</span><span class="hl-0">, -</span><span class="hl-8">4</span><span class="hl-0">, </span><span class="hl-4">&#39;utf16le&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 6</span>
</code></pre>
<p>If <code>value</code> is not a string, number, or <code>Buffer</code>, this method will throw a<code>TypeError</code>. If <code>value</code> is a number, it will be coerced to a valid byte value,
an integer between 0 and 255.</p>
<p>If <code>byteOffset</code> is not a number, it will be coerced to a number. If the result
of coercion is <code>NaN</code> or <code>0</code>, then the entire buffer will be searched. This
behavior matches <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf"><code>String.prototype.indexOf()</code></a>.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">b</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;abcdef&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-5">// Passing a value that&#39;s a number, but not a valid byte.</span><br/><span class="hl-5">// Prints: 2, equivalent to searching for 99 or &#39;c&#39;.</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-8">99.9</span><span class="hl-0">));</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-8">256</span><span class="hl-0"> + </span><span class="hl-8">99</span><span class="hl-0">));</span><br/><br/><span class="hl-5">// Passing a byteOffset that coerces to NaN or 0.</span><br/><span class="hl-5">// Prints: 1, searching the whole buffer.</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, </span><span class="hl-2">undefined</span><span class="hl-0">));</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, {}));</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, </span><span class="hl-2">null</span><span class="hl-0">));</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">indexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, []));</span>
</code></pre>
<p>If <code>value</code> is an empty string or empty <code>Buffer</code> and <code>byteOffset</code> is less
than <code>buf.length</code>, <code>byteOffset</code> will be returned. If <code>value</code> is empty and<code>byteOffset</code> is at least <code>buf.length</code>, <code>buf.length</code> will be returned.</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v1.5.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>What to search for.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> byteOffset: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p>The index of the first occurrence of <code>value</code> in <code>buf</code>, or <code>-1</code> if <code>buf</code> does not contain <code>value</code>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="join" class="tsd-anchor"></a><h3>join</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">join<span class="tsd-signature-symbol">(</span>separator<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.join</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2143</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Adds all the elements of an array separated by the specified separator string.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> separator: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A string used to separate one element of an array from the next in the
resulting String. If omitted, the array elements are separated with a comma.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="keys" class="tsd-anchor"></a><h3>keys</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.keys</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2069</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates and returns an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterator</a> of <code>buf</code> keys (indices).</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">key</span><span class="hl-0"> </span><span class="hl-2">of</span><span class="hl-0"> </span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">keys</span><span class="hl-0">()) {</span><br/><span class="hl-0"> </span><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">key</span><span class="hl-0">);</span><br/><span class="hl-0">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// 0</span><br/><span class="hl-5">// 1</span><br/><span class="hl-5">// 2</span><br/><span class="hl-5">// 3</span><br/><span class="hl-5">// 4</span><br/><span class="hl-5">// 5</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v1.1.0</p>
</dd></dl></div><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="lastIndexOf" class="tsd-anchor"></a><h3>last<wbr/>Index<wbr/>Of</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">last<wbr/>Index<wbr/>Of<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a>, byteOffset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.lastIndexOf</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1992</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Identical to <code>buf.indexOf()</code>, except the last occurrence of <code>value</code> is found
rather than the first occurrence.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;this buffer is a buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;this&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 17</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: 17</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-8">97</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 15 (97 is the decimal ASCII value for &#39;a&#39;)</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;yolo&#39;</span><span class="hl-0">)));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 5</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: -1</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">utf16Buffer</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u039a\u0391\u03a3\u03a3\u0395</span><span class="hl-4">&#39;</span><span class="hl-0">, </span><span class="hl-4">&#39;utf16le&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">utf16Buffer</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u03a3</span><span class="hl-4">&#39;</span><span class="hl-0">, </span><span class="hl-2">undefined</span><span class="hl-0">, </span><span class="hl-4">&#39;utf16le&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 6</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">utf16Buffer</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u03a3</span><span class="hl-4">&#39;</span><span class="hl-0">, -</span><span class="hl-8">5</span><span class="hl-0">, </span><span class="hl-4">&#39;utf16le&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 4</span>
</code></pre>
<p>If <code>value</code> is not a string, number, or <code>Buffer</code>, this method will throw a<code>TypeError</code>. If <code>value</code> is a number, it will be coerced to a valid byte value,
an integer between 0 and 255.</p>
<p>If <code>byteOffset</code> is not a number, it will be coerced to a number. Any arguments
that coerce to <code>NaN</code>, like <code>{}</code> or <code>undefined</code>, will search the whole buffer.
This behavior matches <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf"><code>String.prototype.lastIndexOf()</code></a>.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">b</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;abcdef&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-5">// Passing a value that&#39;s a number, but not a valid byte.</span><br/><span class="hl-5">// Prints: 2, equivalent to searching for 99 or &#39;c&#39;.</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-8">99.9</span><span class="hl-0">));</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-8">256</span><span class="hl-0"> + </span><span class="hl-8">99</span><span class="hl-0">));</span><br/><br/><span class="hl-5">// Passing a byteOffset that coerces to NaN.</span><br/><span class="hl-5">// Prints: 1, searching the whole buffer.</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, </span><span class="hl-2">undefined</span><span class="hl-0">));</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, {}));</span><br/><br/><span class="hl-5">// Passing a byteOffset that coerces to 0.</span><br/><span class="hl-5">// Prints: -1, equivalent to passing 0.</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, </span><span class="hl-2">null</span><span class="hl-0">));</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">b</span><span class="hl-0">.</span><span class="hl-7">lastIndexOf</span><span class="hl-0">(</span><span class="hl-4">&#39;b&#39;</span><span class="hl-0">, []));</span>
</code></pre>
<p>If <code>value</code> is an empty string or empty <code>Buffer</code>, <code>byteOffset</code> will be returned.</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v6.0.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>What to search for.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> byteOffset: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p>The index of the last occurrence of <code>value</code> in <code>buf</code>, or <code>-1</code> if <code>buf</code> does not contain <code>value</code>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="map" class="tsd-anchor"></a><h3>map</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">map<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.map</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2166</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Calls a defined callback function on each element of an array, and returns an array that
contains the results.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to three arguments. The map method calls the
callbackfn function one time for each element in the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5></li><li><h5>index: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>An object to which the this keyword can refer in the callbackfn function.
If thisArg is omitted, undefined is used as the this value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readBigInt64BE" class="tsd-anchor"></a><h3>read<wbr/>Big<wbr/>Int64BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>Big<wbr/>Int64BE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1063</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a signed, big-endian 64-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed
values.</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readBigInt64LE" class="tsd-anchor"></a><h3>read<wbr/>Big<wbr/>Int64LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>Big<wbr/>Int64LE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1072</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a signed, little-endian 64-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed
values.</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readBigUInt64BE" class="tsd-anchor"></a><h3>read<wbr/>BigUInt64BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>BigUInt64BE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1037</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads an unsigned, big-endian 64-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>This function is also available under the <code>readBigUint64BE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readBigUInt64BE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 4294967295n</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readBigUInt64LE" class="tsd-anchor"></a><h3>read<wbr/>BigUInt64LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>BigUInt64LE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1054</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads an unsigned, little-endian 64-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>This function is also available under the <code>readBigUint64LE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0x00</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">, </span><span class="hl-8">0xff</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readBigUInt64LE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 18446744069414584320n</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readDoubleBE" class="tsd-anchor"></a><h3>read<wbr/>DoubleBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>DoubleBE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1404</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a 64-bit, big-endian double from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">, </span><span class="hl-8">7</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readDoubleBE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 8.20788039913184e-304</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readDoubleLE" class="tsd-anchor"></a><h3>read<wbr/>DoubleLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>DoubleLE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1389</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a 64-bit, little-endian double from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">, </span><span class="hl-8">7</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readDoubleLE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 5.447603722011605e-270</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readDoubleLE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readFloatBE" class="tsd-anchor"></a><h3>read<wbr/>FloatBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>FloatBE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1372</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a 32-bit, big-endian float from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readFloatBE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 2.387939260590663e-38</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readFloatLE" class="tsd-anchor"></a><h3>read<wbr/>FloatLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>FloatLE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1357</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a 32-bit, little-endian float from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">, </span><span class="hl-8">4</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readFloatLE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1.539989614439558e-36</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readFloatLE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readInt16BE" class="tsd-anchor"></a><h3>read<wbr/>Int16BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>Int16BE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1304</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a signed, big-endian 16-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt16BE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 5</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readInt16LE" class="tsd-anchor"></a><h3>read<wbr/>Int16LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>Int16LE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1287</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a signed, little-endian 16-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt16LE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1280</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt16LE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readInt32BE" class="tsd-anchor"></a><h3>read<wbr/>Int32BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>Int32BE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1340</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a signed, big-endian 32-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt32BE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 5</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readInt32LE" class="tsd-anchor"></a><h3>read<wbr/>Int32LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>Int32LE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1323</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a signed, little-endian 32-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt32LE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 83886080</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt32LE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readInt8" class="tsd-anchor"></a><h3>read<wbr/>Int8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>Int8<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1268</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads a signed 8-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([-</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt8</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt8</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 5</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readInt8</span><span class="hl-0">(</span><span class="hl-8">2</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readIntBE" class="tsd-anchor"></a><h3>read<wbr/>IntBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>IntBE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1150</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as a big-endian, two&#39;s complement signed value
supporting up to 48 bits of accuracy.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">, </span><span class="hl-8">0x78</span><span class="hl-0">, </span><span class="hl-8">0x90</span><span class="hl-0">, </span><span class="hl-8">0xab</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readIntBE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1234567890ab</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readIntBE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readIntBE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to read. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readIntLE" class="tsd-anchor"></a><h3>read<wbr/>IntLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">read<wbr/>IntLE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1129</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as a little-endian, two&#39;s complement signed value
supporting up to 48 bits of accuracy.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">, </span><span class="hl-8">0x78</span><span class="hl-0">, </span><span class="hl-8">0x90</span><span class="hl-0">, </span><span class="hl-8">0xab</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readIntLE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: -546f87a9cbee</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to read. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readUInt16BE" class="tsd-anchor"></a><h3>readUInt16BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">readUInt16BE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1211</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads an unsigned, big-endian 16-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>This function is also available under the <code>readUint16BE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt16BE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1234</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt16BE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 3456</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readUInt16LE" class="tsd-anchor"></a><h3>readUInt16LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">readUInt16LE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1192</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads an unsigned, little-endian 16-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>This function is also available under the <code>readUint16LE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt16LE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 3412</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt16LE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 5634</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt16LE</span><span class="hl-0">(</span><span class="hl-8">2</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readUInt32BE" class="tsd-anchor"></a><h3>readUInt32BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">readUInt32BE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1247</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads an unsigned, big-endian 32-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>This function is also available under the <code>readUint32BE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">, </span><span class="hl-8">0x78</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt32BE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 12345678</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readUInt32LE" class="tsd-anchor"></a><h3>readUInt32LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">readUInt32LE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1230</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads an unsigned, little-endian 32-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
</div><div><p>This function is also available under the <code>readUint32LE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">, </span><span class="hl-8">0x78</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt32LE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 78563412</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt32LE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readUInt8" class="tsd-anchor"></a><h3>readUInt8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">readUInt8<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1171</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads an unsigned 8-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
</div><div><p>This function is also available under the <code>readUint8</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">1</span><span class="hl-0">, -</span><span class="hl-8">2</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt8</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt8</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 254</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUInt8</span><span class="hl-0">(</span><span class="hl-8">2</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readUIntBE" class="tsd-anchor"></a><h3>readUIntBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">readUIntBE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1112</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as an unsigned big-endian integer supporting
up to 48 bits of accuracy.</p>
</div><div><p>This function is also available under the <code>readUintBE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">, </span><span class="hl-8">0x78</span><span class="hl-0">, </span><span class="hl-8">0x90</span><span class="hl-0">, </span><span class="hl-8">0xab</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUIntBE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 1234567890ab</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUIntBE</span><span class="hl-0">(</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to read. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="readUIntLE" class="tsd-anchor"></a><h3>readUIntLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">readUIntLE<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1091</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reads <code>byteLength</code> number of bytes from <code>buf</code> at the specified <code>offset</code>and interprets the result as an unsigned, little-endian integer supporting
up to 48 bits of accuracy.</p>
</div><div><p>This function is also available under the <code>readUintLE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x12</span><span class="hl-0">, </span><span class="hl-8">0x34</span><span class="hl-0">, </span><span class="hl-8">0x56</span><span class="hl-0">, </span><span class="hl-8">0x78</span><span class="hl-0">, </span><span class="hl-8">0x90</span><span class="hl-0">, </span><span class="hl-8">0xab</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">readUIntLE</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-8">16</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: ab9078563412</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to read. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to read. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><a id="reduce" class="tsd-anchor"></a><h3>reduce</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">reduce<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-signature tsd-kind-icon">reduce<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span>, initialValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-signature tsd-kind-icon">reduce<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, initialValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.reduce</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2178</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Calls the specified callback function for all the elements in an array. The return value of
the callback function is the accumulated result, and is provided as an argument in the next
call to the callback function.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to four arguments. The reduce method calls the
callbackfn function one time for each element in the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>previousValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentIndex: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.reduce</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2179</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>previousValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentIndex: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li><li><h5>initialValue: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.reduce</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2191</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Calls the specified callback function for all the elements in an array. The return value of
the callback function is the accumulated result, and is provided as an argument in the next
call to the callback function.</p>
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>U</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to four arguments. The reduce method calls the
callbackfn function one time for each element in the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>previousValue: <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h5></li><li><h5>currentValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentIndex: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h4></li></ul></li></ul></li><li><h5>initialValue: <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an argument
instead of an array value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><a id="reduceRight" class="tsd-anchor"></a><h3>reduce<wbr/>Right</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">reduce<wbr/>Right<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-signature tsd-kind-icon">reduce<wbr/>Right<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span>, initialValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-signature tsd-kind-icon">reduce<wbr/>Right<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, initialValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.reduceRight</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2203</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Calls the specified callback function for all the elements in an array, in descending order.
The return value of the callback function is the accumulated result, and is provided as an
argument in the next call to the callback function.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to four arguments. The reduceRight method calls
the callbackfn function one time for each element in the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>previousValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentIndex: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.reduceRight</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2204</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>previousValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentIndex: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li><li><h5>initialValue: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.reduceRight</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2216</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Calls the specified callback function for all the elements in an array, in descending order.
The return value of the callback function is the accumulated result, and is provided as an
argument in the next call to the callback function.</p>
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>U</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to four arguments. The reduceRight method calls
the callbackfn function one time for each element in the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>previousValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span>, currentValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, currentIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>previousValue: <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h5></li><li><h5>currentValue: <span class="tsd-signature-type">number</span></h5></li><li><h5>currentIndex: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h4></li></ul></li></ul></li><li><h5>initialValue: <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If initialValue is specified, it is used as the initial value to start
the accumulation. The first call to the callbackfn function provides this value as an argument
instead of an array value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">U</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="reverse" class="tsd-anchor"></a><h3>reverse</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">reverse<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.reverse</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1405</li></ul></aside><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="set" class="tsd-anchor"></a><h3>set</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">set<span class="tsd-signature-symbol">(</span>array<span class="tsd-signature-symbol">: </span><a href="_internal_.ArrayLike.html" class="tsd-signature-type" data-tsd-kind="Interface">ArrayLike</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.set</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2228</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets a value or an array of values.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>array: <a href="_internal_.ArrayLike.html" class="tsd-signature-type" data-tsd-kind="Interface">ArrayLike</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A typed or untyped array of values to set.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The index in the current array at which the values are to be written.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="slice" class="tsd-anchor"></a><h3>slice</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">slice<span class="tsd-signature-symbol">(</span>start<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, end<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.slice</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:788</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a new <code>Buffer</code> that references the same memory as the original, but
offset and cropped by the <code>start</code> and <code>end</code> indices.</p>
</div><div><p>This is the same behavior as <code>buf.subarray()</code>.</p>
<p>This method is not compatible with the <code>Uint8Array.prototype.slice()</code>,
which is a superclass of <code>Buffer</code>. To copy the slice, use<code>Uint8Array.prototype.slice()</code>.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">copiedBuf</span><span class="hl-0"> = </span><span class="hl-9">Uint8Array</span><span class="hl-0">.</span><span class="hl-3">prototype</span><span class="hl-0">.</span><span class="hl-3">slice</span><span class="hl-0">.</span><span class="hl-7">call</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-3">copiedBuf</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">]++;</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">copiedBuf</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">());</span><br/><span class="hl-5">// Prints: cuffer</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">());</span><br/><span class="hl-5">// Prints: buffer</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.3.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> start: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> end: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="some" class="tsd-anchor"></a><h3>some</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">some<span class="tsd-signature-symbol">(</span>predicate<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">unknown</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.some</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2245</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Determines whether the specified callback function returns true for any element of an array.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>predicate: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">unknown</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A function that accepts up to three arguments. The some method calls
the predicate function for each element in the array until the predicate returns a value
which is coercible to the Boolean value true, or until the end of the array.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, array<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5></li><li><h5>index: <span class="tsd-signature-type">number</span></h5></li><li><h5>array: <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>An object to which the this keyword can refer in the predicate function.
If thisArg is omitted, undefined is used as the this value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="sort" class="tsd-anchor"></a><h3>sort</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">sort<span class="tsd-signature-symbol">(</span>compareFn<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, b<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.sort</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2256</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sorts an array.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> compareFn: <span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, b<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Function used to determine the order of the elements. It is expected to return
a negative value if first argument is less than second argument, zero if they&#39;re equal and a positive
value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.</p>
<pre><code class="language-ts"><span class="hl-0">[</span><span class="hl-8">11</span><span class="hl-0">,</span><span class="hl-8">2</span><span class="hl-0">,</span><span class="hl-8">22</span><span class="hl-0">,</span><span class="hl-8">1</span><span class="hl-0">].</span><span class="hl-7">sort</span><span class="hl-0">((</span><span class="hl-3">a</span><span class="hl-0">, </span><span class="hl-3">b</span><span class="hl-0">) </span><span class="hl-2">=&gt;</span><span class="hl-0"> </span><span class="hl-3">a</span><span class="hl-0"> - </span><span class="hl-3">b</span><span class="hl-0">)</span>
</code></pre>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, b<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>a: <span class="tsd-signature-type">number</span></h5></li><li><h5>b: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="subarray" class="tsd-anchor"></a><h3>subarray</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">subarray<span class="tsd-signature-symbol">(</span>start<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, end<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.subarray</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:848</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a new <code>Buffer</code> that references the same memory as the original, but
offset and cropped by the <code>start</code> and <code>end</code> indices.</p>
</div><div><p>Specifying <code>end</code> greater than <code>buf.length</code> will return the same result as
that of <code>end</code> equal to <code>buf.length</code>.</p>
<p>This method is inherited from <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray"><code>TypedArray.prototype.subarray()</code></a>.</p>
<p>Modifying the new <code>Buffer</code> slice will modify the memory in the original <code>Buffer</code>because the allocated memory of the two objects overlap.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-5">// Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte</span><br/><span class="hl-5">// from the original `Buffer`.</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">26</span><span class="hl-0">);</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">let</span><span class="hl-0"> </span><span class="hl-3">i</span><span class="hl-0"> = </span><span class="hl-8">0</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0"> &lt; </span><span class="hl-8">26</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0">++) {</span><br/><span class="hl-0"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-0"> </span><span class="hl-3">buf1</span><span class="hl-0">[</span><span class="hl-3">i</span><span class="hl-0">] = </span><span class="hl-3">i</span><span class="hl-0"> + </span><span class="hl-8">97</span><span class="hl-0">;</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">subarray</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-4">&#39;ascii&#39;</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-3">length</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: abc</span><br/><br/><span class="hl-3">buf1</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">] = </span><span class="hl-8">33</span><span class="hl-0">;</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-4">&#39;ascii&#39;</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-3">length</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: !bc</span>
</code></pre>
<p>Specifying negative indexes causes the slice to be generated relative to the
end of <code>buf</code> rather than the beginning.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">subarray</span><span class="hl-0">(-</span><span class="hl-8">6</span><span class="hl-0">, -</span><span class="hl-8">1</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">());</span><br/><span class="hl-5">// Prints: buffe</span><br/><span class="hl-5">// (Equivalent to buf.subarray(0, 5).)</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">subarray</span><span class="hl-0">(-</span><span class="hl-8">6</span><span class="hl-0">, -</span><span class="hl-8">2</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">());</span><br/><span class="hl-5">// Prints: buff</span><br/><span class="hl-5">// (Equivalent to buf.subarray(0, 4).)</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">subarray</span><span class="hl-0">(-</span><span class="hl-8">5</span><span class="hl-0">, -</span><span class="hl-8">2</span><span class="hl-0">).</span><span class="hl-7">toString</span><span class="hl-0">());</span><br/><span class="hl-5">// Prints: uff</span><br/><span class="hl-5">// (Equivalent to buf.subarray(1, 4).)</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v3.0.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> start: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> end: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="swap16" class="tsd-anchor"></a><h3>swap16</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">swap16<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1441</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Interprets <code>buf</code> as an array of unsigned 16-bit integers and swaps the
byte order <em>in-place</em>. Throws <code>ERR_INVALID_BUFFER_SIZE</code> if <code>buf.length</code> is not a multiple of 2.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x1</span><span class="hl-0">, </span><span class="hl-8">0x2</span><span class="hl-0">, </span><span class="hl-8">0x3</span><span class="hl-0">, </span><span class="hl-8">0x4</span><span class="hl-0">, </span><span class="hl-8">0x5</span><span class="hl-0">, </span><span class="hl-8">0x6</span><span class="hl-0">, </span><span class="hl-8">0x7</span><span class="hl-0">, </span><span class="hl-8">0x8</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span><br/><br/><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">swap16</span><span class="hl-0">();</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 02 01 04 03 06 05 08 07&gt;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x1</span><span class="hl-0">, </span><span class="hl-8">0x2</span><span class="hl-0">, </span><span class="hl-8">0x3</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">swap16</span><span class="hl-0">();</span><br/><span class="hl-5">// Throws ERR_INVALID_BUFFER_SIZE.</span>
</code></pre>
<p>One convenient use of <code>buf.swap16()</code> is to perform a fast in-place conversion
between UTF-16 little-endian and UTF-16 big-endian:</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;This is little-endian UTF-16&#39;</span><span class="hl-0">, </span><span class="hl-4">&#39;utf16le&#39;</span><span class="hl-0">);</span><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">swap16</span><span class="hl-0">(); </span><span class="hl-5">// Convert to big-endian UTF-16 text.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v5.10.0</p>
</dd></dl></div><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4><div><p>A reference to <code>buf</code>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="swap32" class="tsd-anchor"></a><h3>swap32</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">swap32<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1467</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Interprets <code>buf</code> as an array of unsigned 32-bit integers and swaps the
byte order <em>in-place</em>. Throws <code>ERR_INVALID_BUFFER_SIZE</code> if <code>buf.length</code> is not a multiple of 4.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x1</span><span class="hl-0">, </span><span class="hl-8">0x2</span><span class="hl-0">, </span><span class="hl-8">0x3</span><span class="hl-0">, </span><span class="hl-8">0x4</span><span class="hl-0">, </span><span class="hl-8">0x5</span><span class="hl-0">, </span><span class="hl-8">0x6</span><span class="hl-0">, </span><span class="hl-8">0x7</span><span class="hl-0">, </span><span class="hl-8">0x8</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span><br/><br/><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">swap32</span><span class="hl-0">();</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 04 03 02 01 08 07 06 05&gt;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x1</span><span class="hl-0">, </span><span class="hl-8">0x2</span><span class="hl-0">, </span><span class="hl-8">0x3</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">swap32</span><span class="hl-0">();</span><br/><span class="hl-5">// Throws ERR_INVALID_BUFFER_SIZE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v5.10.0</p>
</dd></dl></div><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4><div><p>A reference to <code>buf</code>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="swap64" class="tsd-anchor"></a><h3>swap64</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">swap64<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1493</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Interprets <code>buf</code> as an array of 64-bit numbers and swaps byte order <em>in-place</em>.
Throws <code>ERR_INVALID_BUFFER_SIZE</code> if <code>buf.length</code> is not a multiple of 8.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x1</span><span class="hl-0">, </span><span class="hl-8">0x2</span><span class="hl-0">, </span><span class="hl-8">0x3</span><span class="hl-0">, </span><span class="hl-8">0x4</span><span class="hl-0">, </span><span class="hl-8">0x5</span><span class="hl-0">, </span><span class="hl-8">0x6</span><span class="hl-0">, </span><span class="hl-8">0x7</span><span class="hl-0">, </span><span class="hl-8">0x8</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span><br/><br/><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">swap64</span><span class="hl-0">();</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 08 07 06 05 04 03 02 01&gt;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x1</span><span class="hl-0">, </span><span class="hl-8">0x2</span><span class="hl-0">, </span><span class="hl-8">0x3</span><span class="hl-0">]);</span><br/><br/><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">swap64</span><span class="hl-0">();</span><br/><span class="hl-5">// Throws ERR_INVALID_BUFFER_SIZE.</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v6.3.0</p>
</dd></dl></div><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Buffer-1" class="tsd-signature-type" data-tsd-kind="Variable">Buffer</a></h4><div><p>A reference to <code>buf</code>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="toJSON" class="tsd-anchor"></a><h3>toJSON</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">toJSON<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;Buffer&quot;</span><span class="tsd-signature-symbol"> }</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:630</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a JSON representation of <code>buf</code>. <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify"><code>JSON.stringify()</code></a> implicitly calls
this function when stringifying a <code>Buffer</code> instance.</p>
</div><div><p><code>Buffer.from()</code> accepts objects in the format returned from this method.
In particular, <code>Buffer.from(buf.toJSON())</code> works like <code>Buffer.from(buf)</code>.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">([</span><span class="hl-8">0x1</span><span class="hl-0">, </span><span class="hl-8">0x2</span><span class="hl-0">, </span><span class="hl-8">0x3</span><span class="hl-0">, </span><span class="hl-8">0x4</span><span class="hl-0">, </span><span class="hl-8">0x5</span><span class="hl-0">]);</span><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">json</span><span class="hl-0"> = </span><span class="hl-9">JSON</span><span class="hl-0">.</span><span class="hl-7">stringify</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">json</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: {&quot;type&quot;:&quot;Buffer&quot;,&quot;data&quot;:[1,2,3,4,5]}</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">copy</span><span class="hl-0"> = </span><span class="hl-9">JSON</span><span class="hl-0">.</span><span class="hl-7">parse</span><span class="hl-0">(</span><span class="hl-3">json</span><span class="hl-0">, (</span><span class="hl-3">key</span><span class="hl-0">, </span><span class="hl-3">value</span><span class="hl-0">) </span><span class="hl-2">=&gt;</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-1">return</span><span class="hl-0"> </span><span class="hl-3">value</span><span class="hl-0"> &amp;#</span><span class="hl-3">x26</span><span class="hl-0">;&amp;#</span><span class="hl-3">x26</span><span class="hl-0">; </span><span class="hl-3">value</span><span class="hl-0">.</span><span class="hl-3">type</span><span class="hl-0"> === </span><span class="hl-4">&#39;Buffer&#39;</span><span class="hl-0"> ?</span><br/><span class="hl-0"> </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-3">value</span><span class="hl-0">) :</span><br/><span class="hl-0"> </span><span class="hl-3">value</span><span class="hl-0">;</span><br/><span class="hl-0">});</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">copy</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.9.2</p>
</dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;Buffer&quot;</span><span class="tsd-signature-symbol"> }</span></h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li><li class="tsd-parameter"><h5>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;Buffer&quot;</span></h5></li></ul></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="toLocaleString" class="tsd-anchor"></a><h3>to<wbr/>Locale<wbr/>String</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">to<wbr/>Locale<wbr/>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.toLocaleString</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2269</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Converts a number to a string by using the current locale.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="toString" class="tsd-anchor"></a><h3>to<wbr/>String</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">to<wbr/>String<span class="tsd-signature-symbol">(</span>encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a>, start<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, end<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.toString</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:602</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Decodes <code>buf</code> to a string according to the specified character encoding in<code>encoding</code>. <code>start</code> and <code>end</code> may be passed to decode only a subset of <code>buf</code>.</p>
</div><div><p>If <code>encoding</code> is <code>&#39;utf8&#39;</code> and a byte sequence in the input is not valid UTF-8,
then each invalid byte is replaced with the replacement character <code>U+FFFD</code>.</p>
<p>The maximum length of a string instance (in UTF-16 code units) is available
as {@link constants.MAX_STRING_LENGTH}.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf1</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">26</span><span class="hl-0">);</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">let</span><span class="hl-0"> </span><span class="hl-3">i</span><span class="hl-0"> = </span><span class="hl-8">0</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0"> &lt; </span><span class="hl-8">26</span><span class="hl-0">; </span><span class="hl-3">i</span><span class="hl-0">++) {</span><br/><span class="hl-0"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-0"> </span><span class="hl-3">buf1</span><span class="hl-0">[</span><span class="hl-3">i</span><span class="hl-0">] = </span><span class="hl-3">i</span><span class="hl-0"> + </span><span class="hl-8">97</span><span class="hl-0">;</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-4">&#39;utf8&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: abcdefghijklmnopqrstuvwxyz</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf1</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-4">&#39;utf8&#39;</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">5</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: abcde</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf2</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;tést&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-4">&#39;hex&#39;</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: 74c3a97374</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-4">&#39;utf8&#39;</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: té</span><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf2</span><span class="hl-0">.</span><span class="hl-7">toString</span><span class="hl-0">(</span><span class="hl-2">undefined</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">));</span><br/><span class="hl-5">// Prints: té</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.1.90</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> start: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> end: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a id="valueOf" class="tsd-anchor"></a><h3>value<wbr/>Of</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">value<wbr/>Of<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Uint8Array.valueOf</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2277</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the primitive value of the specified object.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace">&lt;internal&gt;</a><span class="tsd-signature-symbol">.</span><a href="../modules/_internal_.html#Uint8Array-1" class="tsd-signature-type" data-tsd-kind="Variable">Uint8Array</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a id="values" class="tsd-anchor"></a><h3>values</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><li class="tsd-signature tsd-kind-icon">values<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Uint8Array.values</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2103</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates and returns an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterator</a> for <code>buf</code> values (bytes). This function is
called automatically when a <code>Buffer</code> is used in a <code>for..of</code> statement.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">from</span><span class="hl-0">(</span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">value</span><span class="hl-0"> </span><span class="hl-2">of</span><span class="hl-0"> </span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">values</span><span class="hl-0">()) {</span><br/><span class="hl-0"> </span><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">value</span><span class="hl-0">);</span><br/><span class="hl-0">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// 98</span><br/><span class="hl-5">// 117</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 101</span><br/><span class="hl-5">// 114</span><br/><br/><span class="hl-1">for</span><span class="hl-0"> (</span><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">value</span><span class="hl-0"> </span><span class="hl-2">of</span><span class="hl-0"> </span><span class="hl-3">buf</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">value</span><span class="hl-0">);</span><br/><span class="hl-0">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// 98</span><br/><span class="hl-5">// 117</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 101</span><br/><span class="hl-5">// 114</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v1.1.0</p>
</dd></dl></div><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type" data-tsd-kind="Interface">IterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="write" class="tsd-anchor"></a><h3>write</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<span class="tsd-signature-symbol">(</span>string<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-signature tsd-kind-icon">write<span class="tsd-signature-symbol">(</span>string<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-signature tsd-kind-icon">write<span class="tsd-signature-symbol">(</span>string<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, encoding<span class="tsd-signature-symbol">?: </span><a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:561</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>string</code> to <code>buf</code> at <code>offset</code> according to the character encoding in<code>encoding</code>. The <code>length</code> parameter is the number of bytes to write. If <code>buf</code> did
not contain enough space to fit the entire string, only part of <code>string</code> will be
written. However, partially encoded characters will not be written.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">alloc</span><span class="hl-0">(</span><span class="hl-8">256</span><span class="hl-0">);</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">len</span><span class="hl-0"> = </span><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">write</span><span class="hl-0">(</span><span class="hl-4">&#39;</span><span class="hl-12">\u00bd</span><span class="hl-4"> + </span><span class="hl-12">\u00bc</span><span class="hl-4"> = </span><span class="hl-12">\u00be</span><span class="hl-4">&#39;</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-4">`</span><span class="hl-2">${</span><span class="hl-3">len</span><span class="hl-2">}</span><span class="hl-4"> bytes: </span><span class="hl-2">${</span><span class="hl-3">buf</span><span class="hl-10">.</span><span class="hl-7">toString</span><span class="hl-10">(</span><span class="hl-4">&#39;utf8&#39;</span><span class="hl-10">, </span><span class="hl-8">0</span><span class="hl-10">, </span><span class="hl-3">len</span><span class="hl-10">)</span><span class="hl-2">}</span><span class="hl-4">`</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: 12 bytes: ½ + ¼ = ¾</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buffer</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">alloc</span><span class="hl-0">(</span><span class="hl-8">10</span><span class="hl-0">);</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">length</span><span class="hl-0"> = </span><span class="hl-3">buffer</span><span class="hl-0">.</span><span class="hl-7">write</span><span class="hl-0">(</span><span class="hl-4">&#39;abcd&#39;</span><span class="hl-0">, </span><span class="hl-8">8</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-4">`</span><span class="hl-2">${</span><span class="hl-3">length</span><span class="hl-2">}</span><span class="hl-4"> bytes: </span><span class="hl-2">${</span><span class="hl-3">buffer</span><span class="hl-10">.</span><span class="hl-7">toString</span><span class="hl-10">(</span><span class="hl-4">&#39;utf8&#39;</span><span class="hl-10">, </span><span class="hl-8">8</span><span class="hl-10">, </span><span class="hl-8">10</span><span class="hl-10">)</span><span class="hl-2">}</span><span class="hl-4">`</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: 2 bytes : ab</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.1.90</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>string: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>String to write to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p>Number of bytes written.</p>
</div></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:562</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>string: <span class="tsd-signature-type">string</span></h5></li><li><h5>offset: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:563</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>string: <span class="tsd-signature-type">string</span></h5></li><li><h5>offset: <span class="tsd-signature-type">number</span></h5></li><li><h5>length: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> encoding: <a href="../modules/_internal_.html#BufferEncoding" class="tsd-signature-type" data-tsd-kind="Type alias">BufferEncoding</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeBigInt64BE" class="tsd-anchor"></a><h3>write<wbr/>Big<wbr/>Int64BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>Big<wbr/>Int64BE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:869</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian.</p>
</div><div><p><code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">8</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeBigInt64BE</span><span class="hl-0">(</span><span class="hl-8">0x0102030405060708</span><span class="hl-2">n</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">bigint</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeBigInt64LE" class="tsd-anchor"></a><h3>write<wbr/>Big<wbr/>Int64LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>Big<wbr/>Int64LE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:890</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian.</p>
</div><div><p><code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">8</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeBigInt64LE</span><span class="hl-0">(</span><span class="hl-8">0x0102030405060708</span><span class="hl-2">n</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 08 07 06 05 04 03 02 01&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">bigint</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeBigUInt64BE" class="tsd-anchor"></a><h3>write<wbr/>BigUInt64BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>BigUInt64BE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:911</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian.</p>
</div><div><p>This function is also available under the <code>writeBigUint64BE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">8</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeBigUInt64BE</span><span class="hl-0">(</span><span class="hl-8">0xdecafafecacefade</span><span class="hl-2">n</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer de ca fa fe ca ce fa de&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">bigint</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeBigUInt64LE" class="tsd-anchor"></a><h3>write<wbr/>BigUInt64LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>BigUInt64LE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:932</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">8</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeBigUInt64LE</span><span class="hl-0">(</span><span class="hl-8">0xdecafafecacefade</span><span class="hl-2">n</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer de fa ce ca fe fa ca de&gt;</span>
</code></pre>
<p>This function is also available under the <code>writeBigUint64LE</code> alias.</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v12.0.0, v10.20.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">bigint</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeDoubleBE" class="tsd-anchor"></a><h3>write<wbr/>DoubleBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>DoubleBE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1801</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a JavaScript number. Behavior is undefined when <code>value</code> is anything
other than a JavaScript number.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">8</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeDoubleBE</span><span class="hl-0">(</span><span class="hl-8">123.456</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 40 5e dd 2f 1a 9f be 77&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeDoubleLE" class="tsd-anchor"></a><h3>write<wbr/>DoubleLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>DoubleLE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1781</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a JavaScript number. Behavior is undefined when <code>value</code> is anything
other than a JavaScript number.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">8</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeDoubleLE</span><span class="hl-0">(</span><span class="hl-8">123.456</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 77 be 9f 1a 2f dd 5e 40&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeFloatBE" class="tsd-anchor"></a><h3>write<wbr/>FloatBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>FloatBE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1761</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. Behavior is
undefined when <code>value</code> is anything other than a JavaScript number.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeFloatBE</span><span class="hl-0">(</span><span class="hl-8">0xcafebabe</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 4f 4a fe bb&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeFloatLE" class="tsd-anchor"></a><h3>write<wbr/>FloatLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>FloatLE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1741</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. Behavior is
undefined when <code>value</code> is anything other than a JavaScript number.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeFloatLE</span><span class="hl-0">(</span><span class="hl-8">0xcafebabe</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer bb fe 4a 4f&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeInt16BE" class="tsd-anchor"></a><h3>write<wbr/>Int16BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>Int16BE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1677</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid signed 16-bit integer. Behavior is undefined when <code>value</code> is
anything other than a signed 16-bit integer.</p>
</div><div><p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">2</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeInt16BE</span><span class="hl-0">(</span><span class="hl-8">0x0102</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeInt16LE" class="tsd-anchor"></a><h3>write<wbr/>Int16LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>Int16LE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1655</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid signed 16-bit integer. Behavior is undefined when <code>value</code> is
anything other than a signed 16-bit integer.</p>
</div><div><p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">2</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeInt16LE</span><span class="hl-0">(</span><span class="hl-8">0x0304</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 04 03&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeInt32BE" class="tsd-anchor"></a><h3>write<wbr/>Int32BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>Int32BE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1721</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid signed 32-bit integer. Behavior is undefined when <code>value</code> is
anything other than a signed 32-bit integer.</p>
</div><div><p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeInt32BE</span><span class="hl-0">(</span><span class="hl-8">0x01020304</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeInt32LE" class="tsd-anchor"></a><h3>write<wbr/>Int32LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>Int32LE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1699</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid signed 32-bit integer. Behavior is undefined when <code>value</code> is
anything other than a signed 32-bit integer.</p>
</div><div><p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeInt32LE</span><span class="hl-0">(</span><span class="hl-8">0x05060708</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 08 07 06 05&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeInt8" class="tsd-anchor"></a><h3>write<wbr/>Int8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>Int8<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1633</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code>. <code>value</code> must be a valid
signed 8-bit integer. Behavior is undefined when <code>value</code> is anything other than
a signed 8-bit integer.</p>
</div><div><p><code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">2</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeInt8</span><span class="hl-0">(</span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeInt8</span><span class="hl-0">(-</span><span class="hl-8">2</span><span class="hl-0">, </span><span class="hl-8">1</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 02 fe&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeIntBE" class="tsd-anchor"></a><h3>write<wbr/>IntBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>IntBE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1020</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>byteLength</code> bytes of <code>value</code> to <code>buf</code> at the specified <code>offset</code>as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when<code>value</code> is anything other than a
signed integer.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeIntBE</span><span class="hl-0">(</span><span class="hl-8">0x1234567890ab</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 12 34 56 78 90 ab&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to write. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeIntLE" class="tsd-anchor"></a><h3>write<wbr/>IntLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">write<wbr/>IntLE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:999</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>byteLength</code> bytes of <code>value</code> to <code>buf</code> at the specified <code>offset</code>as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
when <code>value</code> is anything other than a signed integer.</p>
</div><div><pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeIntLE</span><span class="hl-0">(</span><span class="hl-8">0x1234567890ab</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ab 90 78 56 34 12&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.11.15</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to write. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeUInt16BE" class="tsd-anchor"></a><h3>writeUInt16BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">writeUInt16BE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1565</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid unsigned 16-bit integer. Behavior is undefined when <code>value</code>is anything other than an
unsigned 16-bit integer.</p>
</div><div><p>This function is also available under the <code>writeUint16BE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt16BE</span><span class="hl-0">(</span><span class="hl-8">0xdead</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt16BE</span><span class="hl-0">(</span><span class="hl-8">0xbeef</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer de ad be ef&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeUInt16LE" class="tsd-anchor"></a><h3>writeUInt16LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">writeUInt16LE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1542</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid unsigned 16-bit integer. Behavior is undefined when <code>value</code> is
anything other than an unsigned 16-bit integer.</p>
</div><div><p>This function is also available under the <code>writeUint16LE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt16LE</span><span class="hl-0">(</span><span class="hl-8">0xdead</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt16LE</span><span class="hl-0">(</span><span class="hl-8">0xbeef</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ad de ef be&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeUInt32BE" class="tsd-anchor"></a><h3>writeUInt32BE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">writeUInt32BE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1609</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian. The <code>value</code>must be a valid unsigned 32-bit integer. Behavior is undefined when <code>value</code>is anything other than an
unsigned 32-bit integer.</p>
</div><div><p>This function is also available under the <code>writeUint32BE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt32BE</span><span class="hl-0">(</span><span class="hl-8">0xfeedface</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer fe ed fa ce&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeUInt32LE" class="tsd-anchor"></a><h3>writeUInt32LE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">writeUInt32LE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1587</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian. The <code>value</code>must be a valid unsigned 32-bit integer. Behavior is undefined when <code>value</code> is
anything other than an unsigned 32-bit integer.</p>
</div><div><p>This function is also available under the <code>writeUint32LE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt32LE</span><span class="hl-0">(</span><span class="hl-8">0xfeedface</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ce fa ed fe&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeUInt8" class="tsd-anchor"></a><h3>writeUInt8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">writeUInt8<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1519</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code>. <code>value</code> must be a
valid unsigned 8-bit integer. Behavior is undefined when <code>value</code> is anything
other than an unsigned 8-bit integer.</p>
</div><div><p>This function is also available under the <code>writeUint8</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">4</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt8</span><span class="hl-0">(</span><span class="hl-8">0x3</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">);</span><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt8</span><span class="hl-0">(</span><span class="hl-8">0x4</span><span class="hl-0">, </span><span class="hl-8">1</span><span class="hl-0">);</span><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt8</span><span class="hl-0">(</span><span class="hl-8">0x23</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">);</span><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUInt8</span><span class="hl-0">(</span><span class="hl-8">0x42</span><span class="hl-0">, </span><span class="hl-8">3</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 03 04 23 42&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeUIntBE" class="tsd-anchor"></a><h3>writeUIntBE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">writeUIntBE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:978</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>byteLength</code> bytes of <code>value</code> to <code>buf</code> at the specified <code>offset</code>as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
when <code>value</code> is anything other than an unsigned integer.</p>
</div><div><p>This function is also available under the <code>writeUintBE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUIntBE</span><span class="hl-0">(</span><span class="hl-8">0x1234567890ab</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 12 34 56 78 90 ab&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to write. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a id="writeUIntLE" class="tsd-anchor"></a><h3>writeUIntLE</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface tsd-is-external"><li class="tsd-signature tsd-kind-icon">writeUIntLE<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, byteLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:955</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes <code>byteLength</code> bytes of <code>value</code> to <code>buf</code> at the specified <code>offset</code>as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
when <code>value</code> is anything other than an unsigned integer.</p>
</div><div><p>This function is also available under the <code>writeUintLE</code> alias.</p>
<pre><code class="language-js"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-3">Buffer</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-4">&#39;buffer&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-2">const</span><span class="hl-0"> </span><span class="hl-6">buf</span><span class="hl-0"> = </span><span class="hl-3">Buffer</span><span class="hl-0">.</span><span class="hl-7">allocUnsafe</span><span class="hl-0">(</span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">buf</span><span class="hl-0">.</span><span class="hl-7">writeUIntLE</span><span class="hl-0">(</span><span class="hl-8">0x1234567890ab</span><span class="hl-0">, </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">6</span><span class="hl-0">);</span><br/><br/><span class="hl-3">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-3">buf</span><span class="hl-0">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ab 90 78 56 34 12&gt;</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.5.5</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number to be written to <code>buf</code>.</p>
</div></div></li><li><h5>offset: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to skip before starting to write. Must satisfy <code>0 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
</div></div></li><li><h5>byteLength: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of bytes to write. Must satisfy <code>0 &lt; byteLength &lt;= 6</code>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p><code>offset</code> plus the number of bytes written.</p>
</div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li><li class="current tsd-kind-namespace"><a href="../modules/_internal_.html">&lt;internal&gt;</a><ul><li class=" tsd-kind-namespace tsd-parent-kind-namespace tsd-is-external"><a href="../modules/_internal_._node_stream_consumers_.html">&quot;node:stream/consumers&quot;</a></li><li class=" tsd-kind-namespace tsd-parent-kind-namespace tsd-is-external"><a href="../modules/_internal_._node_stream_promises_.html">&quot;node:stream/promises&quot;</a></li><li class=" tsd-kind-namespace tsd-parent-kind-namespace tsd-is-external"><a href="../modules/_internal_.EventEmitter.html">Event<wbr/>Emitter</a></li><li class=" tsd-kind-namespace tsd-parent-kind-namespace tsd-is-external"><a href="../modules/_internal_.internal.html">internal</a></li></ul></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface tsd-parent-kind-namespace tsd-is-external"><a href="_internal_.Buffer.html" class="tsd-kind-icon">Buffer</a><ul><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#BYTES_PER_ELEMENT" class="tsd-kind-icon">BYTES_<wbr/>PER_<wbr/>ELEMENT</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#_toStringTag_" class="tsd-kind-icon">[to<wbr/>String<wbr/>Tag]</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#buffer" class="tsd-kind-icon">buffer</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#byteLength" class="tsd-kind-icon">byte<wbr/>Length</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#byteOffset" class="tsd-kind-icon">byte<wbr/>Offset</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#length" class="tsd-kind-icon">length</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#_iterator_" class="tsd-kind-icon">[iterator]</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#at" class="tsd-kind-icon">at</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#compare" class="tsd-kind-icon">compare</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#copy" class="tsd-kind-icon">copy</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#copyWithin" class="tsd-kind-icon">copy<wbr/>Within</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#entries" class="tsd-kind-icon">entries</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#equals" class="tsd-kind-icon">equals</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#every" class="tsd-kind-icon">every</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#fill" class="tsd-kind-icon">fill</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#filter" class="tsd-kind-icon">filter</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#find" class="tsd-kind-icon">find</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#findIndex" class="tsd-kind-icon">find<wbr/>Index</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#forEach" class="tsd-kind-icon">for<wbr/>Each</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#includes" class="tsd-kind-icon">includes</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#indexOf" class="tsd-kind-icon">index<wbr/>Of</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#join" class="tsd-kind-icon">join</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#keys" class="tsd-kind-icon">keys</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#lastIndexOf" class="tsd-kind-icon">last<wbr/>Index<wbr/>Of</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#map" class="tsd-kind-icon">map</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigInt64BE" class="tsd-kind-icon">read<wbr/>Big<wbr/>Int64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigInt64LE" class="tsd-kind-icon">read<wbr/>Big<wbr/>Int64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigUInt64BE" class="tsd-kind-icon">read<wbr/>BigUInt64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readBigUInt64LE" class="tsd-kind-icon">read<wbr/>BigUInt64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readDoubleBE" class="tsd-kind-icon">read<wbr/>DoubleBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readDoubleLE" class="tsd-kind-icon">read<wbr/>DoubleLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readFloatBE" class="tsd-kind-icon">read<wbr/>FloatBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readFloatLE" class="tsd-kind-icon">read<wbr/>FloatLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt16BE" class="tsd-kind-icon">read<wbr/>Int16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt16LE" class="tsd-kind-icon">read<wbr/>Int16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt32BE" class="tsd-kind-icon">read<wbr/>Int32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt32LE" class="tsd-kind-icon">read<wbr/>Int32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readInt8" class="tsd-kind-icon">read<wbr/>Int8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readIntBE" class="tsd-kind-icon">read<wbr/>IntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readIntLE" class="tsd-kind-icon">read<wbr/>IntLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt16BE" class="tsd-kind-icon">readUInt16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt16LE" class="tsd-kind-icon">readUInt16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt32BE" class="tsd-kind-icon">readUInt32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt32LE" class="tsd-kind-icon">readUInt32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUInt8" class="tsd-kind-icon">readUInt8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUIntBE" class="tsd-kind-icon">readUIntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#readUIntLE" class="tsd-kind-icon">readUIntLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#reduce" class="tsd-kind-icon">reduce</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#reduceRight" class="tsd-kind-icon">reduce<wbr/>Right</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#reverse" class="tsd-kind-icon">reverse</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#set" class="tsd-kind-icon">set</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#slice" class="tsd-kind-icon">slice</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#some" class="tsd-kind-icon">some</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#sort" class="tsd-kind-icon">sort</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#subarray" class="tsd-kind-icon">subarray</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#swap16" class="tsd-kind-icon">swap16</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#swap32" class="tsd-kind-icon">swap32</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#swap64" class="tsd-kind-icon">swap64</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#toJSON" class="tsd-kind-icon">toJSON</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#toLocaleString" class="tsd-kind-icon">to<wbr/>Locale<wbr/>String</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#toString" class="tsd-kind-icon">to<wbr/>String</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-inherited tsd-is-external"><a href="_internal_.Buffer.html#valueOf" class="tsd-kind-icon">value<wbr/>Of</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-overwrite tsd-is-external"><a href="_internal_.Buffer.html#values" class="tsd-kind-icon">values</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#write" class="tsd-kind-icon">write</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigInt64BE" class="tsd-kind-icon">write<wbr/>Big<wbr/>Int64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigInt64LE" class="tsd-kind-icon">write<wbr/>Big<wbr/>Int64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigUInt64BE" class="tsd-kind-icon">write<wbr/>BigUInt64BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeBigUInt64LE" class="tsd-kind-icon">write<wbr/>BigUInt64LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeDoubleBE" class="tsd-kind-icon">write<wbr/>DoubleBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeDoubleLE" class="tsd-kind-icon">write<wbr/>DoubleLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeFloatBE" class="tsd-kind-icon">write<wbr/>FloatBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeFloatLE" class="tsd-kind-icon">write<wbr/>FloatLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt16BE" class="tsd-kind-icon">write<wbr/>Int16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt16LE" class="tsd-kind-icon">write<wbr/>Int16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt32BE" class="tsd-kind-icon">write<wbr/>Int32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt32LE" class="tsd-kind-icon">write<wbr/>Int32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeInt8" class="tsd-kind-icon">write<wbr/>Int8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeIntBE" class="tsd-kind-icon">write<wbr/>IntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeIntLE" class="tsd-kind-icon">write<wbr/>IntLE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt16BE" class="tsd-kind-icon">writeUInt16BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt16LE" class="tsd-kind-icon">writeUInt16LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt32BE" class="tsd-kind-icon">writeUInt32BE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt32LE" class="tsd-kind-icon">writeUInt32LE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUInt8" class="tsd-kind-icon">writeUInt8</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUIntBE" class="tsd-kind-icon">writeUIntBE</a></li><li class="tsd-kind-method tsd-parent-kind-interface tsd-is-external"><a href="_internal_.Buffer.html#writeUIntLE" class="tsd-kind-icon">writeUIntLE</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>