mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
817 lines
519 KiB
HTML
817 lines
519 KiB
HTML
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Buffer | liquidjs</title><meta name="description" content="Documentation for liquidjs"/><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 defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></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">liquidjs</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">liquidjs</a></li><li><a href="../modules/_internal_.html"><internal></a></li><li><a href="_internal_.Buffer.html">Buffer</a></li></ul><h1>Interface Buffer</h1></div><div class="tsd-signature"><span class="tsd-signature-keyword">interface </span><span class="tsd-kind-interface">Buffer</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><a class="tsd-kind-property" href="_internal_.Buffer.html#BYTES_PER_ELEMENT">BYTES_PER_ELEMENT</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_internal_.Buffer.html#_toStringTag_">[toStringTag]</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"Uint8Array"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_internal_.Buffer.html#buffer">buffer</a><span class="tsd-signature-symbol">: </span><a href="../types/_internal_.ArrayBufferLike.html" class="tsd-signature-type tsd-kind-type-alias">ArrayBufferLike</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_internal_.Buffer.html#byteLength">byteLength</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_internal_.Buffer.html#byteOffset">byteOffset</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="_internal_.Buffer.html#length">length</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#_iterator_._iterator_-1">[iterator]</a><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 tsd-kind-interface">IterableIterator</a><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><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#at.at-1">at</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</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">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#compare.compare-1">compare</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span>, <span class="tsd-kind-parameter">targetStart</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">targetEnd</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">sourceStart</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">sourceEnd</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">: </span><span class="tsd-signature-type">-1</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">0</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">1</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#copy.copy-1">copy</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span>, <span class="tsd-kind-parameter">targetStart</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">sourceStart</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">sourceEnd</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#copyWithin.copyWithin-1">copyWithin</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">end</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">: </span><span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#entries.entries-1">entries</a><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 tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</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">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#equals.equals-1">equals</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">otherBuffer</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#every.every-1">every</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">thisArg</span><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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#fill.fill-1">fill</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><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><span class="tsd-signature-type">Uint8Array</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">end</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#filter.filter-1">filter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">thisArg</span><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">Uint8Array</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#find.find-1">find</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">thisArg</span><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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#findIndex.findIndex-1">findIndex</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">thisArg</span><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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#forEach.forEach-1">forEach</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">thisArg</span><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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#includes.includes-1">includes</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><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="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type 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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#indexOf.indexOf-1">indexOf</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><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><span class="tsd-signature-type">Uint8Array</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type 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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#join.join-1">join</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">separator</span><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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#keys.keys-1">keys</a><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 tsd-kind-interface">IterableIterator</a><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><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#lastIndexOf.lastIndexOf-1">lastIndexOf</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><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><span class="tsd-signature-type">Uint8Array</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type 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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#map.map-1">map</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">thisArg</span><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">Uint8Array</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readBigInt64BE.readBigInt64BE-1">readBigInt64BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readBigInt64LE.readBigInt64LE-1">readBigInt64LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readBigUInt64BE.readBigUInt64BE-1">readBigUInt64BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readBigUInt64LE.readBigUInt64LE-1">readBigUInt64LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readBigUint64BE-2.readBigUint64BE-3">readBigUint64BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readBigUint64LE-2.readBigUint64LE-3">readBigUint64LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readDoubleBE.readDoubleBE-1">readDoubleBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readDoubleLE.readDoubleLE-1">readDoubleLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readFloatBE.readFloatBE-1">readFloatBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readFloatLE.readFloatLE-1">readFloatLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readInt16BE.readInt16BE-1">readInt16BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readInt16LE.readInt16LE-1">readInt16LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readInt32BE.readInt32BE-1">readInt32BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readInt32LE.readInt32LE-1">readInt32LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readInt8.readInt8-1">readInt8</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readIntBE.readIntBE-1">readIntBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readIntLE.readIntLE-1">readIntLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUInt16BE.readUInt16BE-1">readUInt16BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUInt16LE.readUInt16LE-1">readUInt16LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUInt32BE.readUInt32BE-1">readUInt32BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUInt32LE.readUInt32LE-1">readUInt32LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUInt8.readUInt8-1">readUInt8</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUIntBE.readUIntBE-1">readUIntBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUIntLE.readUIntLE-1">readUIntLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUint16BE-2.readUint16BE-3">readUint16BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUint16LE-2.readUint16LE-3">readUint16LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUint32BE-2.readUint32BE-3">readUint32BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUint32LE-2.readUint32LE-3">readUint32LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUint8-2.readUint8-3">readUint8</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUintBE-2.readUintBE-3">readUintBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#readUintLE-2.readUintLE-3">readUintLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#reduce.reduce-1">reduce</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</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">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#reduce.reduce-2">reduce</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">initialValue</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#reduce.reduce-3">reduce</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">initialValue</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#reduceRight.reduceRight-1">reduceRight</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</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">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#reduceRight.reduceRight-2">reduceRight</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">initialValue</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#reduceRight.reduceRight-3">reduceRight</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">initialValue</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#reverse.reverse-1">reverse</a><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#set.set-1">set</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><a href="_internal_.ArrayLike.html" class="tsd-signature-type tsd-kind-interface">ArrayLike</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#slice.slice-1">slice</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">end</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">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#some.some-1">some</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">)</span>, <span class="tsd-kind-parameter">thisArg</span><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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#sort.sort-1">sort</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">compareFn</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">b</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"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#subarray.subarray-1">subarray</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">end</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">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#swap16.swap16-1">swap16</a><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#swap32.swap32-1">swap32</a><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#swap64.swap64-1">swap64</a><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#toJSON.toJSON-1">toJSON</a><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">data</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">; </span><br/><span> </span><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"Buffer"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#toLocaleString.toLocaleString-1">toLocaleString</a><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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#toString.toString-1">toString</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a>, <span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">end</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">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#valueOf.valueOf-1">valueOf</a><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#values.values-1">values</a><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 tsd-kind-interface">IterableIterator</a><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><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#write.write-1">write</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type 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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#write.write-2">write</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type 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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#write.write-3">write</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">length</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?: </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type 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><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeBigInt64BE.writeBigInt64BE-1">writeBigInt64BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeBigInt64LE.writeBigInt64LE-1">writeBigInt64LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeBigUInt64BE.writeBigUInt64BE-1">writeBigUInt64BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeBigUInt64LE.writeBigUInt64LE-1">writeBigUInt64LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeBigUint64BE-2.writeBigUint64BE-3">writeBigUint64BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeBigUint64LE-2.writeBigUint64LE-3">writeBigUint64LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeDoubleBE.writeDoubleBE-1">writeDoubleBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeDoubleLE.writeDoubleLE-1">writeDoubleLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeFloatBE.writeFloatBE-1">writeFloatBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeFloatLE.writeFloatLE-1">writeFloatLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeInt16BE.writeInt16BE-1">writeInt16BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeInt16LE.writeInt16LE-1">writeInt16LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeInt32BE.writeInt32BE-1">writeInt32BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeInt32LE.writeInt32LE-1">writeInt32LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeInt8.writeInt8-1">writeInt8</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeIntBE.writeIntBE-1">writeIntBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeIntLE.writeIntLE-1">writeIntLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUInt16BE.writeUInt16BE-1">writeUInt16BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUInt16LE.writeUInt16LE-1">writeUInt16LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUInt32BE.writeUInt32BE-1">writeUInt32BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUInt32LE.writeUInt32LE-1">writeUInt32LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUInt8.writeUInt8-1">writeUInt8</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUIntBE.writeUIntBE-1">writeUIntBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUIntLE.writeUIntLE-1">writeUIntLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUint16BE-2.writeUint16BE-3">writeUint16BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUint16LE-2.writeUint16LE-3">writeUint16LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUint32BE-2.writeUint32BE-3">writeUint32BE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUint32LE-2.writeUint32LE-3">writeUint32LE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUint8-2.writeUint8-3">writeUint8</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUintBE-2.writeUintBE-3">writeUintBE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-call-signature" href="_internal_.Buffer.html#writeUintLE-2.writeUintLE-3">writeUintLE</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">byteLength</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">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">Uint8Array</span><ul class="tsd-hierarchy"><li><span class="target">Buffer</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:643</li><li>Defined in node_modules/@types/node/buffer.d.ts:2245</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="_internal_.Buffer.html#BYTES_PER_ELEMENT" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>BYTES_<wbr/>PER_<wbr/>ELEMENT</span></a>
|
||
<a href="_internal_.Buffer.html#_toStringTag_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[to<wbr/>String<wbr/>Tag]</span></a>
|
||
<a href="_internal_.Buffer.html#buffer" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>buffer</span></a>
|
||
<a href="_internal_.Buffer.html#byteLength" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>byte<wbr/>Length</span></a>
|
||
<a href="_internal_.Buffer.html#byteOffset" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>byte<wbr/>Offset</span></a>
|
||
<a href="_internal_.Buffer.html#length" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>length</span></a>
|
||
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="_internal_.Buffer.html#_iterator_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[iterator]</span></a>
|
||
<a href="_internal_.Buffer.html#at" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>at</span></a>
|
||
<a href="_internal_.Buffer.html#compare" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compare</span></a>
|
||
<a href="_internal_.Buffer.html#copy" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a>
|
||
<a href="_internal_.Buffer.html#copyWithin" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy<wbr/>Within</span></a>
|
||
<a href="_internal_.Buffer.html#entries" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>entries</span></a>
|
||
<a href="_internal_.Buffer.html#equals" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>equals</span></a>
|
||
<a href="_internal_.Buffer.html#every" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>every</span></a>
|
||
<a href="_internal_.Buffer.html#fill" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>fill</span></a>
|
||
<a href="_internal_.Buffer.html#filter" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>filter</span></a>
|
||
<a href="_internal_.Buffer.html#find" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find</span></a>
|
||
<a href="_internal_.Buffer.html#findIndex" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find<wbr/>Index</span></a>
|
||
<a href="_internal_.Buffer.html#forEach" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>for<wbr/>Each</span></a>
|
||
<a href="_internal_.Buffer.html#includes" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>includes</span></a>
|
||
<a href="_internal_.Buffer.html#indexOf" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>index<wbr/>Of</span></a>
|
||
<a href="_internal_.Buffer.html#join" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>join</span></a>
|
||
<a href="_internal_.Buffer.html#keys" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>keys</span></a>
|
||
<a href="_internal_.Buffer.html#lastIndexOf" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>last<wbr/>Index<wbr/>Of</span></a>
|
||
<a href="_internal_.Buffer.html#map" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map</span></a>
|
||
<a href="_internal_.Buffer.html#readBigInt64BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Int64BE</span></a>
|
||
<a href="_internal_.Buffer.html#readBigInt64LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Int64LE</span></a>
|
||
<a href="_internal_.Buffer.html#readBigUInt64BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>BigUInt64BE</span></a>
|
||
<a href="_internal_.Buffer.html#readBigUInt64LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>BigUInt64LE</span></a>
|
||
<a href="_internal_.Buffer.html#readBigUint64BE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Uint64BE</span></a>
|
||
<a href="_internal_.Buffer.html#readBigUint64LE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Uint64LE</span></a>
|
||
<a href="_internal_.Buffer.html#readDoubleBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>DoubleBE</span></a>
|
||
<a href="_internal_.Buffer.html#readDoubleLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>DoubleLE</span></a>
|
||
<a href="_internal_.Buffer.html#readFloatBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>FloatBE</span></a>
|
||
<a href="_internal_.Buffer.html#readFloatLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>FloatLE</span></a>
|
||
<a href="_internal_.Buffer.html#readInt16BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int16BE</span></a>
|
||
<a href="_internal_.Buffer.html#readInt16LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int16LE</span></a>
|
||
<a href="_internal_.Buffer.html#readInt32BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int32BE</span></a>
|
||
<a href="_internal_.Buffer.html#readInt32LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int32LE</span></a>
|
||
<a href="_internal_.Buffer.html#readInt8" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int8</span></a>
|
||
<a href="_internal_.Buffer.html#readIntBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>IntBE</span></a>
|
||
<a href="_internal_.Buffer.html#readIntLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>IntLE</span></a>
|
||
<a href="_internal_.Buffer.html#readUInt16BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt16BE</span></a>
|
||
<a href="_internal_.Buffer.html#readUInt16LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt16LE</span></a>
|
||
<a href="_internal_.Buffer.html#readUInt32BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt32BE</span></a>
|
||
<a href="_internal_.Buffer.html#readUInt32LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt32LE</span></a>
|
||
<a href="_internal_.Buffer.html#readUInt8" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt8</span></a>
|
||
<a href="_internal_.Buffer.html#readUIntBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUIntBE</span></a>
|
||
<a href="_internal_.Buffer.html#readUIntLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUIntLE</span></a>
|
||
<a href="_internal_.Buffer.html#readUint16BE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint16BE</span></a>
|
||
<a href="_internal_.Buffer.html#readUint16LE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint16LE</span></a>
|
||
<a href="_internal_.Buffer.html#readUint32BE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint32BE</span></a>
|
||
<a href="_internal_.Buffer.html#readUint32LE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint32LE</span></a>
|
||
<a href="_internal_.Buffer.html#readUint8-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint8</span></a>
|
||
<a href="_internal_.Buffer.html#readUintBE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>UintBE</span></a>
|
||
<a href="_internal_.Buffer.html#readUintLE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>UintLE</span></a>
|
||
<a href="_internal_.Buffer.html#reduce" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reduce</span></a>
|
||
<a href="_internal_.Buffer.html#reduceRight" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reduce<wbr/>Right</span></a>
|
||
<a href="_internal_.Buffer.html#reverse" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reverse</span></a>
|
||
<a href="_internal_.Buffer.html#set" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set</span></a>
|
||
<a href="_internal_.Buffer.html#slice" class="tsd-index-link deprecated tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>slice</span></a>
|
||
<a href="_internal_.Buffer.html#some" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>some</span></a>
|
||
<a href="_internal_.Buffer.html#sort" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sort</span></a>
|
||
<a href="_internal_.Buffer.html#subarray" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>subarray</span></a>
|
||
<a href="_internal_.Buffer.html#swap16" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>swap16</span></a>
|
||
<a href="_internal_.Buffer.html#swap32" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>swap32</span></a>
|
||
<a href="_internal_.Buffer.html#swap64" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>swap64</span></a>
|
||
<a href="_internal_.Buffer.html#toJSON" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>toJSON</span></a>
|
||
<a href="_internal_.Buffer.html#toLocaleString" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Locale<wbr/>String</span></a>
|
||
<a href="_internal_.Buffer.html#toString" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>String</span></a>
|
||
<a href="_internal_.Buffer.html#valueOf" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>value<wbr/>Of</span></a>
|
||
<a href="_internal_.Buffer.html#values" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>values</span></a>
|
||
<a href="_internal_.Buffer.html#write" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write</span></a>
|
||
<a href="_internal_.Buffer.html#writeBigInt64BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Int64BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeBigInt64LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Int64LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeBigUInt64BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>BigUInt64BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeBigUInt64LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>BigUInt64LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeBigUint64BE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Uint64BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeBigUint64LE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Uint64LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeDoubleBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>DoubleBE</span></a>
|
||
<a href="_internal_.Buffer.html#writeDoubleLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>DoubleLE</span></a>
|
||
<a href="_internal_.Buffer.html#writeFloatBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>FloatBE</span></a>
|
||
<a href="_internal_.Buffer.html#writeFloatLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>FloatLE</span></a>
|
||
<a href="_internal_.Buffer.html#writeInt16BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int16BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeInt16LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int16LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeInt32BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int32BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeInt32LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int32LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeInt8" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int8</span></a>
|
||
<a href="_internal_.Buffer.html#writeIntBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>IntBE</span></a>
|
||
<a href="_internal_.Buffer.html#writeIntLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>IntLE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUInt16BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt16BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUInt16LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt16LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUInt32BE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt32BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUInt32LE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt32LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUInt8" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt8</span></a>
|
||
<a href="_internal_.Buffer.html#writeUIntBE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUIntBE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUIntLE" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUIntLE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUint16BE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint16BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUint16LE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint16LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUint32BE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint32BE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUint32LE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint32LE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUint8-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint8</span></a>
|
||
<a href="_internal_.Buffer.html#writeUintBE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>UintBE</span></a>
|
||
<a href="_internal_.Buffer.html#writeUintLE-2" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>UintLE</span></a>
|
||
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="BYTES_PER_ELEMENT" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>BYTES_<wbr/>PER_<wbr/>ELEMENT</span><a href="#BYTES_PER_ELEMENT" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">BYTES_<wbr/>PER_<wbr/>ELEMENT</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The size in bytes of each element in the array.</p>
|
||
</div><div class="tsd-comment tsd-typography"></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:2133</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_toStringTag_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>[to<wbr/>String<wbr/>Tag]</span><a href="#_toStringTag_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">[to<wbr/>String<wbr/>Tag]</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"Uint8Array"</span></div><aside class="tsd-sources"><p>Inherited from Uint8Array.[toStringTag]</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-is-inherited tsd-is-external"><a id="buffer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>buffer</span><a href="#buffer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">buffer</span><span class="tsd-signature-symbol">:</span> <a href="../types/_internal_.ArrayBufferLike.html" class="tsd-signature-type tsd-kind-type-alias">ArrayBufferLike</a></div><div class="tsd-comment tsd-typography"><p>The ArrayBuffer instance referenced by the array.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.buffer</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2138</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="byteLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>byte<wbr/>Length</span><a href="#byteLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">byte<wbr/>Length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The length in bytes of the array.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.byteLength</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2143</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="byteOffset" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>byte<wbr/>Offset</span><a href="#byteOffset" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">byte<wbr/>Offset</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The offset in bytes of the array.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.byteOffset</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2148</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="length" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>length</span><a href="#length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The length of the array.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.length</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2247</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_iterator_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[iterator]</span><a href="#_iterator_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_iterator_._iterator_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[iterator]</span><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 tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><a href="#_iterator_._iterator_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from Uint8Array.[iterator]</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:272</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="at" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>at</span><a href="#at" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="at.at-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">at</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</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><a href="#at.at-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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 class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><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><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.at</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:135</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="compare" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>compare</span><a href="#compare" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="compare.compare-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compare</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span>, <span class="tsd-kind-parameter">targetStart</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">targetEnd</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">sourceStart</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">sourceEnd</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">-1</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">0</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">1</span><a href="#compare.compare-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'ABC'</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'BCD'</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf3</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'ABCD'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 0</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: -1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf3</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: -1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf3</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">([</span><span class="hl-2">buf1</span><span class="hl-1">, </span><span class="hl-2">buf2</span><span class="hl-1">, </span><span class="hl-2">buf3</span><span class="hl-1">].</span><span class="hl-6">sort</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-2">compare</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: [ <Buffer 41 42 43>, <Buffer 41 42 43 44>, <Buffer 42 43 44> ]</span><br/><span class="hl-7">// (This result is equal to: [buf1, buf3, buf2].)</span>
|
||
</code><button type="button">Copy</button></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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">, </span><span class="hl-13">7</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">, </span><span class="hl-13">9</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">, </span><span class="hl-13">7</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">, </span><span class="hl-13">9</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-13">9</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 0</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: -1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">compare</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
<p><code>ERR_OUT_OF_RANGE</code> is thrown if <code>targetStart < 0</code>, <code>sourceStart < 0</code>, <code>targetEnd > target.byteLength</code>, or <code>sourceEnd > source.byteLength</code>.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">target</span>: <span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>A <code>Buffer</code> or Uint8Array with which to compare <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">targetStart</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>target</code> at which to begin comparison.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">targetEnd</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>target</code> at which to end comparison (not inclusive).</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">sourceStart</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>buf</code> at which to begin comparison.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">sourceEnd</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>buf</code> at which to end comparison (not inclusive).</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">-1</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">0</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">1</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since" class="tsd-anchor"></a>Since<a href="#Since" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.13</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:819</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="copy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copy</span><a href="#copy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="copy.copy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span>, <span class="tsd-kind-parameter">targetStart</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">sourceStart</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">sourceEnd</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#copy.copy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Create two `Buffer` instances.</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">26</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">26</span><span class="hl-1">).</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">'!'</span><span class="hl-1">);</span><br/><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-4">let</span><span class="hl-1"> </span><span class="hl-2">i</span><span class="hl-1"> = </span><span class="hl-13">0</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1"> < </span><span class="hl-13">26</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-7">// 97 is the decimal ASCII value for 'a'.</span><br/><span class="hl-1"> </span><span class="hl-2">buf1</span><span class="hl-1">[</span><span class="hl-2">i</span><span class="hl-1">] = </span><span class="hl-2">i</span><span class="hl-1"> + </span><span class="hl-13">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-7">// Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.</span><br/><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">copy</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">, </span><span class="hl-13">16</span><span class="hl-1">, </span><span class="hl-13">20</span><span class="hl-1">);</span><br/><span class="hl-7">// This is equivalent to:</span><br/><span class="hl-7">// buf2.set(buf1.subarray(16, 20), 8);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-3">'ascii'</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">25</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: !!!!!!!!qrst!!!!!!!!!!!!!</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Create a `Buffer` and copy data from one region to an overlapping region</span><br/><span class="hl-7">// within the same `Buffer`.</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">26</span><span class="hl-1">);</span><br/><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-4">let</span><span class="hl-1"> </span><span class="hl-2">i</span><span class="hl-1"> = </span><span class="hl-13">0</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1"> < </span><span class="hl-13">26</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-7">// 97 is the decimal ASCII value for 'a'.</span><br/><span class="hl-1"> </span><span class="hl-2">buf</span><span class="hl-1">[</span><span class="hl-2">i</span><span class="hl-1">] = </span><span class="hl-2">i</span><span class="hl-1"> + </span><span class="hl-13">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">copy</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: efghijghijklmnopqrstuvwxyz</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">target</span>: <span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>A <code>Buffer</code> or Uint8Array to copy into.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">targetStart</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>target</code> at which to begin writing.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">sourceStart</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>buf</code> from which to begin copying.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">sourceEnd</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The offset within <code>buf</code> at which to stop copying (not inclusive).</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The number of bytes copied.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-1" class="tsd-anchor"></a>Since<a href="#Since-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.90</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:879</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="copyWithin" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copy<wbr/>Within</span><a href="#copyWithin" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="copyWithin.copyWithin-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy<wbr/>Within</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">target</span>, <span class="tsd-kind-parameter">start</span>, <span class="tsd-kind-parameter">end</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#copyWithin.copyWithin-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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 class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">target</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>If target is negative, it is treated as length+target where length is the
|
||
length of the array.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">start</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>If start is negative, it is treated as length+start. If end is negative, it
|
||
is treated as length+end.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">end</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>If not specified, length of the this object is used as its default value.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.copyWithin</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2159</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="entries" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>entries</span><a href="#entries" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="entries.entries-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">entries</span><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 tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</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">></span><a href="#entries.entries-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array of key, value pairs for every entry in the array</p>
|
||
</div><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</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">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.entries</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:276</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="equals" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>equals</span><a href="#equals" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="equals.equals-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">equals</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">otherBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#equals.equals-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'ABC'</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'414243'</span><span class="hl-1">, </span><span class="hl-3">'hex'</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf3</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'ABCD'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">equals</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: true</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">equals</span><span class="hl-1">(</span><span class="hl-2">buf3</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: false</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">otherBuffer</span>: <span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>A <code>Buffer</code> or Uint8Array with which to compare <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-2" class="tsd-anchor"></a>Since<a href="#Since-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.13</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:764</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="every" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>every</span><a href="#every" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="every.every-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">every</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#every.every-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Determines whether all the members of an array satisfy the specified test.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">predicate</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.every</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2169</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="fill" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>fill</span><a href="#fill" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="fill.fill-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">fill</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">end</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#fill.fill-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Fill a `Buffer` with the ASCII character 'h'.</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">b</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">50</span><span class="hl-1">).</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">'h'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh</span><br/><br/><span class="hl-7">// Fill a buffer with empty string</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">c</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">5</span><span class="hl-1">).</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">''</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">c</span><span class="hl-1">.</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">''</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: <Buffer 00 00 00 00 00></span>
|
||
</code><button type="button">Copy</button></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 &#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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Fill a `Buffer` with character that takes up two bytes in UTF-8.</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">5</span><span class="hl-1">).</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u0222</span><span class="hl-3">'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: <Buffer c8 a2 c8 a2 c8></span>
|
||
</code><button type="button">Copy</button></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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">5</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">'a'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: <Buffer 61 61 61 61 61></span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">'aazz'</span><span class="hl-1">, </span><span class="hl-3">'hex'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: <Buffer aa aa aa aa aa></span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-3">'zz'</span><span class="hl-1">, </span><span class="hl-3">'hex'</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws an exception.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</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><span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>The value with which to fill <code>buf</code>. Empty value (string, Uint8Array, Buffer) is coerced to <code>0</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to fill <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">end</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where to stop filling <code>buf</code> (not inclusive).</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>The encoding for <code>value</code> if <code>value</code> is a string.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>A reference to <code>buf</code>.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-3" class="tsd-anchor"></a>Since<a href="#Since-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.0</p>
|
||
</div><aside class="tsd-sources"><p>Overrides Uint8Array.fill</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2076</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="filter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>filter</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="filter.filter-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><a href="#filter.filter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the elements of an array that meet the condition specified in a callback function.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">predicate</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Uint8Array</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.filter</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2188</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="find" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>find</span><a href="#find" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="find.find-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</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><a href="#find.find-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the value of the first element in the array where predicate is true, and undefined
|
||
otherwise.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">predicate</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">obj</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><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><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.find</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2199</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="findIndex" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>find<wbr/>Index</span><a href="#findIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="findIndex.findIndex-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">find<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#findIndex.findIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the index of the first element in the array where predicate is true, and -1
|
||
otherwise.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">predicate</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">obj</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.findIndex</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2210</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="forEach" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>for<wbr/>Each</span><a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="forEach.forEach-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">for<wbr/>Each</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#forEach.forEach-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Performs the specified action for each element in an array.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.forEach</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2219</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="includes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>includes</span><a href="#includes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="includes.includes-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">includes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#includes.includes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Equivalent to <code>buf.indexOf() !== -1</code>.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'this is a buffer'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">includes</span><span class="hl-1">(</span><span class="hl-3">'this'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: true</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">includes</span><span class="hl-1">(</span><span class="hl-3">'is'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: true</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">includes</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'a buffer'</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: true</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">includes</span><span class="hl-1">(</span><span class="hl-13">97</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: true (97 is the decimal ASCII value for 'a')</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">includes</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'a buffer example'</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: false</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">includes</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'a buffer example'</span><span class="hl-1">).</span><span class="hl-6">slice</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: true</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">includes</span><span class="hl-1">(</span><span class="hl-3">'this'</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: false</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</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="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></span><div class="tsd-comment tsd-typography"><p>What to search for.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">byteOffset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where to begin searching in <code>buf</code>. If negative, then offset is calculated from the end of <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>If <code>value</code> is a string, this is its encoding.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if <code>value</code> was found in <code>buf</code>, <code>false</code> otherwise.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-4" class="tsd-anchor"></a>Since<a href="#Since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v5.3.0</p>
|
||
</div><aside class="tsd-sources"><p>Overrides Uint8Array.includes</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2243</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="indexOf" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>index<wbr/>Of</span><a href="#indexOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="indexOf.indexOf-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">index<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#indexOf.indexOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>If <code>value</code> is:</p>
|
||
<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.subarray</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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'this is a buffer'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'this'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 0</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'is'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 2</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'a buffer'</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: 8</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-13">97</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 8 (97 is the decimal ASCII value for 'a')</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'a buffer example'</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: -1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'a buffer example'</span><span class="hl-1">).</span><span class="hl-6">slice</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: 8</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">utf16Buffer</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u039a\u0391\u03a3\u03a3\u0395</span><span class="hl-3">'</span><span class="hl-1">, </span><span class="hl-3">'utf16le'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">utf16Buffer</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u03a3</span><span class="hl-3">'</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-3">'utf16le'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 4</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">utf16Buffer</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u03a3</span><span class="hl-3">'</span><span class="hl-1">, -</span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-3">'utf16le'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 6</span>
|
||
</code><button type="button">Copy</button></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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">b</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'abcdef'</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// Passing a value that's a number, but not a valid byte.</span><br/><span class="hl-7">// Prints: 2, equivalent to searching for 99 or 'c'.</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-13">99.9</span><span class="hl-1">));</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-13">256</span><span class="hl-1"> + </span><span class="hl-13">99</span><span class="hl-1">));</span><br/><br/><span class="hl-7">// Passing a byteOffset that coerces to NaN or 0.</span><br/><span class="hl-7">// Prints: 1, searching the whole buffer.</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, </span><span class="hl-4">undefined</span><span class="hl-1">));</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, {}));</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, </span><span class="hl-4">null</span><span class="hl-1">));</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">indexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, []));</span>
|
||
</code><button type="button">Copy</button></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><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</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><span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>What to search for.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">byteOffset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where to begin searching in <code>buf</code>. If negative, then offset is calculated from the end of <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>If <code>value</code> is a string, this is the encoding used to determine the binary representation of the string that will be searched for in <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><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 class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-5" class="tsd-anchor"></a>Since<a href="#Since-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v1.5.0</p>
|
||
</div><aside class="tsd-sources"><p>Overrides Uint8Array.indexOf</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2145</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="join" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>join</span><a href="#join" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="join.join-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">join</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">separator</span><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><a href="#join.join-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds all the elements of an array separated by the specified separator string.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">separator</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.join</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2234</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="keys" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>keys</span><a href="#keys" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="keys.keys-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">keys</span><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 tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><a href="#keys.keys-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an list of keys in the array</p>
|
||
</div><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.keys</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:280</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="lastIndexOf" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>last<wbr/>Index<wbr/>Of</span><a href="#lastIndexOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="lastIndexOf.lastIndexOf-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">last<wbr/>Index<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#lastIndexOf.lastIndexOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Identical to <code>buf.indexOf()</code>, except the last occurrence of <code>value</code> is found
|
||
rather than the first occurrence.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'this buffer is a buffer'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'this'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 0</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'buffer'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 17</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'buffer'</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: 17</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-13">97</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 15 (97 is the decimal ASCII value for 'a')</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'yolo'</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: -1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'buffer'</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 5</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'buffer'</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: -1</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">utf16Buffer</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u039a\u0391\u03a3\u03a3\u0395</span><span class="hl-3">'</span><span class="hl-1">, </span><span class="hl-3">'utf16le'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">utf16Buffer</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u03a3</span><span class="hl-3">'</span><span class="hl-1">, </span><span class="hl-4">undefined</span><span class="hl-1">, </span><span class="hl-3">'utf16le'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 6</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">utf16Buffer</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u03a3</span><span class="hl-3">'</span><span class="hl-1">, -</span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-3">'utf16le'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 4</span>
|
||
</code><button type="button">Copy</button></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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">b</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'abcdef'</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// Passing a value that's a number, but not a valid byte.</span><br/><span class="hl-7">// Prints: 2, equivalent to searching for 99 or 'c'.</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-13">99.9</span><span class="hl-1">));</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-13">256</span><span class="hl-1"> + </span><span class="hl-13">99</span><span class="hl-1">));</span><br/><br/><span class="hl-7">// Passing a byteOffset that coerces to NaN.</span><br/><span class="hl-7">// Prints: 1, searching the whole buffer.</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, </span><span class="hl-4">undefined</span><span class="hl-1">));</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, {}));</span><br/><br/><span class="hl-7">// Passing a byteOffset that coerces to 0.</span><br/><span class="hl-7">// Prints: -1, equivalent to passing 0.</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, </span><span class="hl-4">null</span><span class="hl-1">));</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">b</span><span class="hl-1">.</span><span class="hl-6">lastIndexOf</span><span class="hl-1">(</span><span class="hl-3">'b'</span><span class="hl-1">, []));</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
<p>If <code>value</code> is an empty string or empty <code>Buffer</code>, <code>byteOffset</code> will be returned.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</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><span class="tsd-signature-type">Uint8Array</span></span><div class="tsd-comment tsd-typography"><p>What to search for.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">byteOffset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where to begin searching in <code>buf</code>. If negative, then offset is calculated from the end of <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>If <code>value</code> is a string, this is the encoding used to determine the binary representation of the string that will be searched for in <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><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 class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-6" class="tsd-anchor"></a>Since<a href="#Since-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
|
||
</div><aside class="tsd-sources"><p>Overrides Uint8Array.lastIndexOf</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2213</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="map" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>map</span><a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="map.map-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><a href="#map.map-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Calls a defined callback function on each element of an array, and returns an array that
|
||
contains the results.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Uint8Array</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.map</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2257</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readBigInt64BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Big<wbr/>Int64BE</span><a href="#readBigInt64BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readBigInt64BE.readBigInt64BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Big<wbr/>Int64BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span><a href="#readBigInt64BE.readBigInt64BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a signed, big-endian 64-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<p>Integers read from a <code>Buffer</code> are interpreted as two's complement signed
|
||
values.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-7" class="tsd-anchor"></a>Since<a href="#Since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1218</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readBigInt64LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Big<wbr/>Int64LE</span><a href="#readBigInt64LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readBigInt64LE.readBigInt64LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Big<wbr/>Int64LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span><a href="#readBigInt64LE.readBigInt64LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a signed, little-endian 64-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>Integers read from a <code>Buffer</code> are interpreted as two's complement signed
|
||
values.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-8" class="tsd-anchor"></a>Since<a href="#Since-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1227</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readBigUInt64BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>BigUInt64BE</span><a href="#readBigUInt64BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readBigUInt64BE.readBigUInt64BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>BigUInt64BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span><a href="#readBigUInt64BE.readBigUInt64BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, big-endian 64-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>This function is also available under the <code>readBigUint64BE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readBigUInt64BE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 4294967295n</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-9" class="tsd-anchor"></a>Since<a href="#Since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1182</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readBigUInt64LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>BigUInt64LE</span><a href="#readBigUInt64LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readBigUInt64LE.readBigUInt64LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>BigUInt64LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span><a href="#readBigUInt64LE.readBigUInt64LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, little-endian 64-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>This function is also available under the <code>readBigUint64LE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0x00</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">, </span><span class="hl-13">0xff</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readBigUInt64LE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 18446744069414584320n</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-10" class="tsd-anchor"></a>Since<a href="#Since-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1204</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readBigUint64BE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Big<wbr/>Uint64BE</span><a href="#readBigUint64BE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readBigUint64BE-2.readBigUint64BE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Big<wbr/>Uint64BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span><a href="#readBigUint64BE-2.readBigUint64BE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias" class="tsd-anchor"></a>Alias<a href="#Alias" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readBigUInt64BE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-11" class="tsd-anchor"></a>Since<a href="#Since-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.10.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1187</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readBigUint64LE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Big<wbr/>Uint64LE</span><a href="#readBigUint64LE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readBigUint64LE-2.readBigUint64LE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Big<wbr/>Uint64LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">bigint</span><a href="#readBigUint64LE-2.readBigUint64LE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">bigint</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-1" class="tsd-anchor"></a>Alias<a href="#Alias-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readBigUInt64LE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-12" class="tsd-anchor"></a>Since<a href="#Since-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.10.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1209</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readDoubleBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>DoubleBE</span><a href="#readDoubleBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readDoubleBE.readDoubleBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>DoubleBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readDoubleBE.readDoubleBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a 64-bit, big-endian double from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">, </span><span class="hl-13">7</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readDoubleBE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 8.20788039913184e-304</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-13" class="tsd-anchor"></a>Since<a href="#Since-13" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1594</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readDoubleLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>DoubleLE</span><a href="#readDoubleLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readDoubleLE.readDoubleLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>DoubleLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readDoubleLE.readDoubleLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a 64-bit, little-endian double from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">, </span><span class="hl-13">7</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readDoubleLE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 5.447603722011605e-270</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readDoubleLE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-14" class="tsd-anchor"></a>Since<a href="#Since-14" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1579</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readFloatBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>FloatBE</span><a href="#readFloatBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readFloatBE.readFloatBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>FloatBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readFloatBE.readFloatBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a 32-bit, big-endian float from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readFloatBE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 2.387939260590663e-38</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-15" class="tsd-anchor"></a>Since<a href="#Since-15" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1562</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readFloatLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>FloatLE</span><a href="#readFloatLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readFloatLE.readFloatLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>FloatLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readFloatLE.readFloatLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a 32-bit, little-endian float from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readFloatLE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1.539989614439558e-36</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readFloatLE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-16" class="tsd-anchor"></a>Since<a href="#Since-16" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1547</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Int16BE</span><a href="#readInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readInt16BE.readInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Int16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readInt16BE.readInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a signed, big-endian 16-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<p>Integers read from a <code>Buffer</code> are interpreted as two's complement signed values.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt16BE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 5</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-17" class="tsd-anchor"></a>Since<a href="#Since-17" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1494</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Int16LE</span><a href="#readInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readInt16LE.readInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Int16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readInt16LE.readInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a signed, little-endian 16-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>Integers read from a <code>Buffer</code> are interpreted as two's complement signed values.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt16LE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1280</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt16LE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-18" class="tsd-anchor"></a>Since<a href="#Since-18" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1477</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Int32BE</span><a href="#readInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readInt32BE.readInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Int32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readInt32BE.readInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a signed, big-endian 32-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<p>Integers read from a <code>Buffer</code> are interpreted as two's complement signed values.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt32BE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 5</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-19" class="tsd-anchor"></a>Since<a href="#Since-19" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1530</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Int32LE</span><a href="#readInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readInt32LE.readInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Int32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readInt32LE.readInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a signed, little-endian 32-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>Integers read from a <code>Buffer</code> are interpreted as two's complement signed values.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt32LE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 83886080</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt32LE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-20" class="tsd-anchor"></a>Since<a href="#Since-20" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1513</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readInt8" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Int8</span><a href="#readInt8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readInt8.readInt8-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Int8</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readInt8.readInt8-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a signed 8-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<p>Integers read from a <code>Buffer</code> are interpreted as two's complement signed values.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([-</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt8</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: -1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt8</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 5</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readInt8</span><span class="hl-1">(</span><span class="hl-13">2</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 1</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-21" class="tsd-anchor"></a>Since<a href="#Since-21" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1458</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>IntBE</span><a href="#readIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readIntBE.readIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>IntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readIntBE.readIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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's complement signed value
|
||
supporting up to 48 bits of accuracy.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">, </span><span class="hl-13">0x78</span><span class="hl-1">, </span><span class="hl-13">0x90</span><span class="hl-1">, </span><span class="hl-13">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readIntBE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1234567890ab</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readIntBE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readIntBE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to read. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-22" class="tsd-anchor"></a>Since<a href="#Since-22" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1315</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>IntLE</span><a href="#readIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readIntLE.readIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>IntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readIntLE.readIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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's complement signed value
|
||
supporting up to 48 bits of accuracy.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">, </span><span class="hl-13">0x78</span><span class="hl-1">, </span><span class="hl-13">0x90</span><span class="hl-1">, </span><span class="hl-13">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readIntLE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: -546f87a9cbee</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to read. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-23" class="tsd-anchor"></a>Since<a href="#Since-23" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1294</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUInt16BE</span><a href="#readUInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUInt16BE.readUInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUInt16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUInt16BE.readUInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, big-endian 16-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>This function is also available under the <code>readUint16BE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt16BE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1234</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt16BE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 3456</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-24" class="tsd-anchor"></a>Since<a href="#Since-24" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1386</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUInt16LE</span><a href="#readUInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUInt16LE.readUInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUInt16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUInt16LE.readUInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, little-endian 16-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<p>This function is also available under the <code>readUint16LE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt16LE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 3412</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt16LE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 5634</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt16LE</span><span class="hl-1">(</span><span class="hl-13">2</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-25" class="tsd-anchor"></a>Since<a href="#Since-25" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1362</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUInt32BE</span><a href="#readUInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUInt32BE.readUInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUInt32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUInt32BE.readUInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, big-endian 32-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>This function is also available under the <code>readUint32BE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">, </span><span class="hl-13">0x78</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt32BE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 12345678</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-26" class="tsd-anchor"></a>Since<a href="#Since-26" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1432</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUInt32LE</span><a href="#readUInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUInt32LE.readUInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUInt32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUInt32LE.readUInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned, little-endian 32-bit integer from <code>buf</code> at the specified<code>offset</code>.</p>
|
||
<p>This function is also available under the <code>readUint32LE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">, </span><span class="hl-13">0x78</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt32LE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 78563412</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt32LE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-27" class="tsd-anchor"></a>Since<a href="#Since-27" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1410</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUInt8" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUInt8</span><a href="#readUInt8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUInt8.readUInt8-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUInt8</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUInt8.readUInt8-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an unsigned 8-bit integer from <code>buf</code> at the specified <code>offset</code>.</p>
|
||
<p>This function is also available under the <code>readUint8</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">1</span><span class="hl-1">, -</span><span class="hl-13">2</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt8</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt8</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 254</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUInt8</span><span class="hl-1">(</span><span class="hl-13">2</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - 1</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-28" class="tsd-anchor"></a>Since<a href="#Since-28" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1336</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUIntBE</span><a href="#readUIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUIntBE.readUIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUIntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUIntBE.readUIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>readUintBE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">, </span><span class="hl-13">0x78</span><span class="hl-1">, </span><span class="hl-13">0x90</span><span class="hl-1">, </span><span class="hl-13">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUIntBE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 1234567890ab</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUIntBE</span><span class="hl-1">(</span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Throws ERR_OUT_OF_RANGE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to read. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-29" class="tsd-anchor"></a>Since<a href="#Since-29" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1272</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readUIntLE</span><a href="#readUIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUIntLE.readUIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readUIntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUIntLE.readUIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>readUintLE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x12</span><span class="hl-1">, </span><span class="hl-13">0x34</span><span class="hl-1">, </span><span class="hl-13">0x56</span><span class="hl-1">, </span><span class="hl-13">0x78</span><span class="hl-1">, </span><span class="hl-13">0x90</span><span class="hl-1">, </span><span class="hl-13">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">readUIntLE</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-13">16</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: ab9078563412</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to read. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to read. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-30" class="tsd-anchor"></a>Since<a href="#Since-30" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1246</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUint16BE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Uint16BE</span><a href="#readUint16BE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUint16BE-2.readUint16BE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Uint16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUint16BE-2.readUint16BE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-2" class="tsd-anchor"></a>Alias<a href="#Alias-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readUInt16BE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-31" class="tsd-anchor"></a>Since<a href="#Since-31" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1391</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUint16LE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Uint16LE</span><a href="#readUint16LE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUint16LE-2.readUint16LE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Uint16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUint16LE-2.readUint16LE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-3" class="tsd-anchor"></a>Alias<a href="#Alias-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readUInt16LE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-32" class="tsd-anchor"></a>Since<a href="#Since-32" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1367</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUint32BE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Uint32BE</span><a href="#readUint32BE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUint32BE-2.readUint32BE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Uint32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUint32BE-2.readUint32BE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-4" class="tsd-anchor"></a>Alias<a href="#Alias-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readUInt32BE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-33" class="tsd-anchor"></a>Since<a href="#Since-33" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1437</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUint32LE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Uint32LE</span><a href="#readUint32LE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUint32LE-2.readUint32LE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Uint32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUint32LE-2.readUint32LE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-5" class="tsd-anchor"></a>Alias<a href="#Alias-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readUInt32LE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-34" class="tsd-anchor"></a>Since<a href="#Since-34" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1415</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUint8-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Uint8</span><a href="#readUint8-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUint8-2.readUint8-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>Uint8</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUint8-2.readUint8-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-6" class="tsd-anchor"></a>Alias<a href="#Alias-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readUInt8</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-35" class="tsd-anchor"></a>Since<a href="#Since-35" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1341</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUintBE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>UintBE</span><a href="#readUintBE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUintBE-2.readUintBE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>UintBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUintBE-2.readUintBE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-7" class="tsd-anchor"></a>Alias<a href="#Alias-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readUIntBE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-36" class="tsd-anchor"></a>Since<a href="#Since-36" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1277</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="readUintLE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>UintLE</span><a href="#readUintLE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="readUintLE-2.readUintLE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read<wbr/>UintLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#readUintLE-2.readUintLE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-8" class="tsd-anchor"></a>Alias<a href="#Alias-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.readUIntLE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-37" class="tsd-anchor"></a>Since<a href="#Since-37" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1251</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="reduce" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>reduce</span><a href="#reduce" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="reduce.reduce-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#reduce.reduce-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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 class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span>, <span class="tsd-kind-parameter">currentValue</span>, <span class="tsd-kind-parameter">currentIndex</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previousValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentIndex</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.reduce</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2269</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="reduce.reduce-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span>, <span class="tsd-kind-parameter">initialValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#reduce.reduce-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span>, <span class="tsd-kind-parameter">currentValue</span>, <span class="tsd-kind-parameter">currentIndex</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previousValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentIndex</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li><li><span><span class="tsd-kind-parameter">initialValue</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"><p>Inherited from Uint8Array.reduce</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2270</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="reduce.reduce-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span>, <span class="tsd-kind-parameter">initialValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a><a href="#reduce.reduce-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="reduce.reduce-3.U" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">U</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span>, <span class="tsd-kind-parameter">currentValue</span>, <span class="tsd-kind-parameter">currentIndex</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previousValue</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a></span></li><li><span><span class="tsd-kind-parameter">currentValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentIndex</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a></h4></li></ul></li></ul></li><li><span><span class="tsd-kind-parameter">initialValue</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduce.reduce-3.U">U</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.reduce</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2282</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="reduceRight" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>reduce<wbr/>Right</span><a href="#reduceRight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="reduceRight.reduceRight-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce<wbr/>Right</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#reduceRight.reduceRight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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 class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span>, <span class="tsd-kind-parameter">currentValue</span>, <span class="tsd-kind-parameter">currentIndex</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previousValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentIndex</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.reduceRight</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2294</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="reduceRight.reduceRight-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce<wbr/>Right</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span>, <span class="tsd-kind-parameter">initialValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#reduceRight.reduceRight-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span>, <span class="tsd-kind-parameter">currentValue</span>, <span class="tsd-kind-parameter">currentIndex</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previousValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentIndex</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li><li><span><span class="tsd-kind-parameter">initialValue</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"><p>Inherited from Uint8Array.reduceRight</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2295</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="reduceRight.reduceRight-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce<wbr/>Right</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span>, <span class="tsd-kind-parameter">initialValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a><a href="#reduceRight.reduceRight-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="reduceRight.reduceRight-3.U-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">U</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a>, <span class="tsd-kind-parameter">currentValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">currentIndex</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previousValue</span>, <span class="tsd-kind-parameter">currentValue</span>, <span class="tsd-kind-parameter">currentIndex</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previousValue</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a></span></li><li><span><span class="tsd-kind-parameter">currentValue</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">currentIndex</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a></h4></li></ul></li></ul></li><li><span><span class="tsd-kind-parameter">initialValue</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Buffer.html#reduceRight.reduceRight-3.U-1">U</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.reduceRight</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2307</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="reverse" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>reverse</span><a href="#reverse" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="reverse.reverse-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reverse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#reverse.reverse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reverses the elements in an Array.</p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides Uint8Array.reverse</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1595</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="set" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set</span><a href="#set" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="set.set-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">array</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#set.set-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sets a value or an array of values.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">array</span>: <a href="_internal_.ArrayLike.html" class="tsd-signature-type tsd-kind-interface">ArrayLike</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>A typed or untyped array of values to set.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The index in the current array at which the values are to be written.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.set</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2319</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="slice" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="deprecated">slice</span><a href="#slice" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="slice.slice-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">slice</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">end</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#slice.slice-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'buffer'</span><span class="hl-1">);</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">copiedBuf</span><span class="hl-1"> = </span><span class="hl-15">Uint8Array</span><span class="hl-1">.</span><span class="hl-2">prototype</span><span class="hl-1">.</span><span class="hl-2">slice</span><span class="hl-1">.</span><span class="hl-6">call</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-2">copiedBuf</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]++;</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">copiedBuf</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: cuffer</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: buffer</span><br/><br/><span class="hl-7">// With buf.slice(), the original buffer is modified.</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">notReallyCopiedBuf</span><span class="hl-1"> = </span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">slice</span><span class="hl-1">();</span><br/><span class="hl-2">notReallyCopiedBuf</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]++;</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">notReallyCopiedBuf</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: cuffer</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Also prints: cuffer (!)</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">start</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where the new <code>Buffer</code> will start.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">end</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where the new <code>Buffer</code> will end (not inclusive).</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-38" class="tsd-anchor"></a>Since<a href="#Since-38" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.3.0</p>
|
||
<h4 class="tsd-anchor-link"><a id="Deprecated" class="tsd-anchor"></a>Deprecated<a href="#Deprecated" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Use <code>subarray</code> instead.</p>
|
||
</div><aside class="tsd-sources"><p>Overrides Uint8Array.slice</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:913</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="some" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>some</span><a href="#some" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="some.some-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">some</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">predicate</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#some.some-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Determines whether the specified callback function returns true for any element of an array.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">predicate</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">array</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><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 class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.some</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2336</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="sort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>sort</span><a href="#sort" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="sort.sort-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">sort</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">compareFn</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#sort.sort-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sorts an array.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">compareFn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">b</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"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><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're equal and a positive
|
||
value otherwise. If omitted, the elements are sorted in ascending order.</p>
|
||
<pre><code class="ts"><span class="hl-1">[</span><span class="hl-13">11</span><span class="hl-1">,</span><span class="hl-13">2</span><span class="hl-1">,</span><span class="hl-13">22</span><span class="hl-1">,</span><span class="hl-13">1</span><span class="hl-1">].</span><span class="hl-6">sort</span><span class="hl-1">((</span><span class="hl-2">a</span><span class="hl-1">, </span><span class="hl-2">b</span><span class="hl-1">) </span><span class="hl-4">=></span><span class="hl-1"> </span><span class="hl-2">a</span><span class="hl-1"> - </span><span class="hl-2">b</span><span class="hl-1">)</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a</span>, <span class="tsd-kind-parameter">b</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">a</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">b</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.sort</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2347</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="subarray" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>subarray</span><a href="#subarray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="subarray.subarray-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">subarray</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">end</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#subarray.subarray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte</span><br/><span class="hl-7">// from the original `Buffer`.</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">26</span><span class="hl-1">);</span><br/><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-4">let</span><span class="hl-1"> </span><span class="hl-2">i</span><span class="hl-1"> = </span><span class="hl-13">0</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1"> < </span><span class="hl-13">26</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-7">// 97 is the decimal ASCII value for 'a'.</span><br/><span class="hl-1"> </span><span class="hl-2">buf1</span><span class="hl-1">[</span><span class="hl-2">i</span><span class="hl-1">] = </span><span class="hl-2">i</span><span class="hl-1"> + </span><span class="hl-13">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">subarray</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-3">'ascii'</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-2">length</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: abc</span><br/><br/><span class="hl-2">buf1</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">] = </span><span class="hl-13">33</span><span class="hl-1">;</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-3">'ascii'</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-2">length</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: !bc</span>
|
||
</code><button type="button">Copy</button></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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'buffer'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">subarray</span><span class="hl-1">(-</span><span class="hl-13">6</span><span class="hl-1">, -</span><span class="hl-13">1</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: buffe</span><br/><span class="hl-7">// (Equivalent to buf.subarray(0, 5).)</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">subarray</span><span class="hl-1">(-</span><span class="hl-13">6</span><span class="hl-1">, -</span><span class="hl-13">2</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: buff</span><br/><span class="hl-7">// (Equivalent to buf.subarray(0, 4).)</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">subarray</span><span class="hl-1">(-</span><span class="hl-13">5</span><span class="hl-1">, -</span><span class="hl-13">2</span><span class="hl-1">).</span><span class="hl-6">toString</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: uff</span><br/><span class="hl-7">// (Equivalent to buf.subarray(1, 4).)</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">start</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where the new <code>Buffer</code> will start.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">end</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Where the new <code>Buffer</code> will end (not inclusive).</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-39" class="tsd-anchor"></a>Since<a href="#Since-39" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v3.0.0</p>
|
||
</div><aside class="tsd-sources"><p>Overrides Uint8Array.subarray</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:973</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="swap16" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>swap16</span><a href="#swap16" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="swap16.swap16-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">swap16</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#swap16.swap16-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x1</span><span class="hl-1">, </span><span class="hl-13">0x2</span><span class="hl-1">, </span><span class="hl-13">0x3</span><span class="hl-1">, </span><span class="hl-13">0x4</span><span class="hl-1">, </span><span class="hl-13">0x5</span><span class="hl-1">, </span><span class="hl-13">0x6</span><span class="hl-1">, </span><span class="hl-13">0x7</span><span class="hl-1">, </span><span class="hl-13">0x8</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 01 02 03 04 05 06 07 08></span><br/><br/><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">swap16</span><span class="hl-1">();</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 02 01 04 03 06 05 08 07></span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x1</span><span class="hl-1">, </span><span class="hl-13">0x2</span><span class="hl-1">, </span><span class="hl-13">0x3</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">swap16</span><span class="hl-1">();</span><br/><span class="hl-7">// Throws ERR_INVALID_BUFFER_SIZE.</span>
|
||
</code><button type="button">Copy</button></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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'This is little-endian UTF-16'</span><span class="hl-1">, </span><span class="hl-3">'utf16le'</span><span class="hl-1">);</span><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">swap16</span><span class="hl-1">(); </span><span class="hl-7">// Convert to big-endian UTF-16 text.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><p>A reference to <code>buf</code>.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-40" class="tsd-anchor"></a>Since<a href="#Since-40" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v5.10.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1631</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="swap32" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>swap32</span><a href="#swap32" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="swap32.swap32-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">swap32</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#swap32.swap32-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x1</span><span class="hl-1">, </span><span class="hl-13">0x2</span><span class="hl-1">, </span><span class="hl-13">0x3</span><span class="hl-1">, </span><span class="hl-13">0x4</span><span class="hl-1">, </span><span class="hl-13">0x5</span><span class="hl-1">, </span><span class="hl-13">0x6</span><span class="hl-1">, </span><span class="hl-13">0x7</span><span class="hl-1">, </span><span class="hl-13">0x8</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 01 02 03 04 05 06 07 08></span><br/><br/><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">swap32</span><span class="hl-1">();</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 04 03 02 01 08 07 06 05></span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x1</span><span class="hl-1">, </span><span class="hl-13">0x2</span><span class="hl-1">, </span><span class="hl-13">0x3</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">swap32</span><span class="hl-1">();</span><br/><span class="hl-7">// Throws ERR_INVALID_BUFFER_SIZE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><p>A reference to <code>buf</code>.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-41" class="tsd-anchor"></a>Since<a href="#Since-41" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v5.10.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1657</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="swap64" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>swap64</span><a href="#swap64" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="swap64.swap64-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">swap64</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#swap64.swap64-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x1</span><span class="hl-1">, </span><span class="hl-13">0x2</span><span class="hl-1">, </span><span class="hl-13">0x3</span><span class="hl-1">, </span><span class="hl-13">0x4</span><span class="hl-1">, </span><span class="hl-13">0x5</span><span class="hl-1">, </span><span class="hl-13">0x6</span><span class="hl-1">, </span><span class="hl-13">0x7</span><span class="hl-1">, </span><span class="hl-13">0x8</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 01 02 03 04 05 06 07 08></span><br/><br/><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">swap64</span><span class="hl-1">();</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 08 07 06 05 04 03 02 01></span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x1</span><span class="hl-1">, </span><span class="hl-13">0x2</span><span class="hl-1">, </span><span class="hl-13">0x3</span><span class="hl-1">]);</span><br/><br/><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">swap64</span><span class="hl-1">();</span><br/><span class="hl-7">// Throws ERR_INVALID_BUFFER_SIZE.</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><p>A reference to <code>buf</code>.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-42" class="tsd-anchor"></a>Since<a href="#Since-42" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.3.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1683</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="toJSON" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>toJSON</span><a href="#toJSON" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="toJSON.toJSON-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">toJSON</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">data</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">; </span><br/><span> </span><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"Buffer"</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><a href="#toJSON.toJSON-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<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="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x1</span><span class="hl-1">, </span><span class="hl-13">0x2</span><span class="hl-1">, </span><span class="hl-13">0x3</span><span class="hl-1">, </span><span class="hl-13">0x4</span><span class="hl-1">, </span><span class="hl-13">0x5</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">json</span><span class="hl-1"> = </span><span class="hl-5">JSON</span><span class="hl-1">.</span><span class="hl-6">stringify</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">json</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: {"type":"Buffer","data":[1,2,3,4,5]}</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">copy</span><span class="hl-1"> = </span><span class="hl-5">JSON</span><span class="hl-1">.</span><span class="hl-6">parse</span><span class="hl-1">(</span><span class="hl-2">json</span><span class="hl-1">, (</span><span class="hl-2">key</span><span class="hl-1">, </span><span class="hl-2">value</span><span class="hl-1">) </span><span class="hl-4">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-0">return</span><span class="hl-1"> </span><span class="hl-2">value</span><span class="hl-1"> &#</span><span class="hl-2">x26</span><span class="hl-1">;&#</span><span class="hl-2">x26</span><span class="hl-1">; </span><span class="hl-2">value</span><span class="hl-1">.</span><span class="hl-2">type</span><span class="hl-1"> === </span><span class="hl-3">'Buffer'</span><span class="hl-1"> ?</span><br/><span class="hl-1"> </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-2">value</span><span class="hl-1">) :</span><br/><span class="hl-1"> </span><span class="hl-2">value</span><span class="hl-1">;</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">copy</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 01 02 03 04 05></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">data</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">; </span><br/><span> </span><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"Buffer"</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">data</span><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><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"Buffer"</span></h5></li></ul><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-43" class="tsd-anchor"></a>Since<a href="#Since-43" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.9.2</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:742</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="toLocaleString" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>to<wbr/>Locale<wbr/>String</span><a href="#toLocaleString" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="toLocaleString.toLocaleString-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">to<wbr/>Locale<wbr/>String</span><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><a href="#toLocaleString.toLocaleString-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Converts a number to a string by using the current locale.</p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.toLocaleString</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2360</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="toString" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="toString.toString-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">to<wbr/>String</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">end</span><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><a href="#toString.toString-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>If <code>encoding</code> is <code>'utf8'</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 constants.MAX_STRING_LENGTH.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">26</span><span class="hl-1">);</span><br/><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-4">let</span><span class="hl-1"> </span><span class="hl-2">i</span><span class="hl-1"> = </span><span class="hl-13">0</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1"> < </span><span class="hl-13">26</span><span class="hl-1">; </span><span class="hl-2">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-7">// 97 is the decimal ASCII value for 'a'.</span><br/><span class="hl-1"> </span><span class="hl-2">buf1</span><span class="hl-1">[</span><span class="hl-2">i</span><span class="hl-1">] = </span><span class="hl-2">i</span><span class="hl-1"> + </span><span class="hl-13">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-3">'utf8'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: abcdefghijklmnopqrstuvwxyz</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-3">'utf8'</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: abcde</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">'tést'</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-3">'hex'</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: 74c3a97374</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-3">'utf8'</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: té</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-6">toString</span><span class="hl-1">(</span><span class="hl-4">undefined</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: té</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>The character encoding to use.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">start</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The byte offset to start decoding at.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">end</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The byte offset to stop decoding at (not inclusive).</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-44" class="tsd-anchor"></a>Since<a href="#Since-44" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.90</p>
|
||
</div><aside class="tsd-sources"><p>Overrides Uint8Array.toString</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:714</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="valueOf" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>value<wbr/>Of</span><a href="#valueOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="valueOf.valueOf-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">value<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><a href="#valueOf.valueOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the primitive value of the specified object.</p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Uint8Array</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.valueOf</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:2368</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="values" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>values</span><a href="#values" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="values.values-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">values</span><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 tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><a href="#values.values-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an list of values in the array</p>
|
||
</div><h4 class="tsd-returns-title">Returns <a href="_internal_.IterableIterator.html" class="tsd-signature-type tsd-kind-interface">IterableIterator</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Uint8Array.values</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:284</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="write" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write</span><a href="#write" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="write.write-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#write.write-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">256</span><span class="hl-1">);</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">len</span><span class="hl-1"> = </span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">write</span><span class="hl-1">(</span><span class="hl-3">'</span><span class="hl-14">\u00bd</span><span class="hl-3"> + </span><span class="hl-14">\u00bc</span><span class="hl-3"> = </span><span class="hl-14">\u00be</span><span class="hl-3">'</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">`</span><span class="hl-4">${</span><span class="hl-2">len</span><span class="hl-4">}</span><span class="hl-3"> bytes: </span><span class="hl-4">${</span><span class="hl-2">buf</span><span class="hl-10">.</span><span class="hl-6">toString</span><span class="hl-10">(</span><span class="hl-3">'utf8'</span><span class="hl-10">, </span><span class="hl-13">0</span><span class="hl-10">, </span><span class="hl-2">len</span><span class="hl-10">)</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: 12 bytes: ½ + ¼ = ¾</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buffer</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">length</span><span class="hl-1"> = </span><span class="hl-2">buffer</span><span class="hl-1">.</span><span class="hl-6">write</span><span class="hl-1">(</span><span class="hl-3">'abcd'</span><span class="hl-1">, </span><span class="hl-13">8</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">`</span><span class="hl-4">${</span><span class="hl-2">length</span><span class="hl-4">}</span><span class="hl-3"> bytes: </span><span class="hl-4">${</span><span class="hl-2">buffer</span><span class="hl-10">.</span><span class="hl-6">toString</span><span class="hl-10">(</span><span class="hl-3">'utf8'</span><span class="hl-10">, </span><span class="hl-13">8</span><span class="hl-10">, </span><span class="hl-13">10</span><span class="hl-10">)</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: 2 bytes : ab</span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">string</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>String to write to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>The character encoding of <code>string</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>Number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-45" class="tsd-anchor"></a>Since<a href="#Since-45" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.90</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:673</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="write.write-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#write.write-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">string</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:674</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="write.write-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">length</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#write.write-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">string</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">length</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:675</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeBigInt64BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Big<wbr/>Int64BE</span><a href="#writeBigInt64BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeBigInt64BE.writeBigInt64BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Big<wbr/>Int64BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeBigInt64BE.writeBigInt64BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian.</p>
|
||
<p><code>value</code> is interpreted and written as a two's complement signed integer.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">8</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeBigInt64BE</span><span class="hl-1">(</span><span class="hl-13">0x0102030405060708</span><span class="hl-4">n</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 01 02 03 04 05 06 07 08></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">bigint</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-46" class="tsd-anchor"></a>Since<a href="#Since-46" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:994</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeBigInt64LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Big<wbr/>Int64LE</span><a href="#writeBigInt64LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeBigInt64LE.writeBigInt64LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Big<wbr/>Int64LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeBigInt64LE.writeBigInt64LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian.</p>
|
||
<p><code>value</code> is interpreted and written as a two's complement signed integer.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">8</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeBigInt64LE</span><span class="hl-1">(</span><span class="hl-13">0x0102030405060708</span><span class="hl-4">n</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 08 07 06 05 04 03 02 01></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">bigint</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-47" class="tsd-anchor"></a>Since<a href="#Since-47" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1015</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeBigUInt64BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>BigUInt64BE</span><a href="#writeBigUInt64BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeBigUInt64BE.writeBigUInt64BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>BigUInt64BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeBigUInt64BE.writeBigUInt64BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as big-endian.</p>
|
||
<p>This function is also available under the <code>writeBigUint64BE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">8</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeBigUInt64BE</span><span class="hl-1">(</span><span class="hl-13">0xdecafafecacefade</span><span class="hl-4">n</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer de ca fa fe ca ce fa de></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">bigint</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-48" class="tsd-anchor"></a>Since<a href="#Since-48" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1036</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeBigUInt64LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>BigUInt64LE</span><a href="#writeBigUInt64LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeBigUInt64LE.writeBigUInt64LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>BigUInt64LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeBigUInt64LE.writeBigUInt64LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes <code>value</code> to <code>buf</code> at the specified <code>offset</code> as little-endian</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">8</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeBigUInt64LE</span><span class="hl-1">(</span><span class="hl-13">0xdecafafecacefade</span><span class="hl-4">n</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer de fa ce ca fe fa ca de></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
<p>This function is also available under the <code>writeBigUint64LE</code> alias.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">bigint</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy: <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-49" class="tsd-anchor"></a>Since<a href="#Since-49" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v12.0.0, v10.20.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1062</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeBigUint64BE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Big<wbr/>Uint64BE</span><a href="#writeBigUint64BE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeBigUint64BE-2.writeBigUint64BE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Big<wbr/>Uint64BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeBigUint64BE-2.writeBigUint64BE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">bigint</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-9" class="tsd-anchor"></a>Alias<a href="#Alias-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeBigUInt64BE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-50" class="tsd-anchor"></a>Since<a href="#Since-50" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.10.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1041</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeBigUint64LE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Big<wbr/>Uint64LE</span><a href="#writeBigUint64LE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeBigUint64LE-2.writeBigUint64LE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Big<wbr/>Uint64LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeBigUint64LE-2.writeBigUint64LE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">bigint</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-10" class="tsd-anchor"></a>Alias<a href="#Alias-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeBigUInt64LE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-51" class="tsd-anchor"></a>Since<a href="#Since-51" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.10.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1067</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeDoubleBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>DoubleBE</span><a href="#writeDoubleBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeDoubleBE.writeDoubleBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>DoubleBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeDoubleBE.writeDoubleBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">8</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeDoubleBE</span><span class="hl-1">(</span><span class="hl-13">123.456</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 40 5e dd 2f 1a 9f be 77></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-52" class="tsd-anchor"></a>Since<a href="#Since-52" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2016</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeDoubleLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>DoubleLE</span><a href="#writeDoubleLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeDoubleLE.writeDoubleLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>DoubleLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeDoubleLE.writeDoubleLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">8</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeDoubleLE</span><span class="hl-1">(</span><span class="hl-13">123.456</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 77 be 9f 1a 2f dd 5e 40></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 8</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-53" class="tsd-anchor"></a>Since<a href="#Since-53" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1996</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeFloatBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>FloatBE</span><a href="#writeFloatBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeFloatBE.writeFloatBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>FloatBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeFloatBE.writeFloatBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeFloatBE</span><span class="hl-1">(</span><span class="hl-13">0xcafebabe</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 4f 4a fe bb></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-54" class="tsd-anchor"></a>Since<a href="#Since-54" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1976</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeFloatLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>FloatLE</span><a href="#writeFloatLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeFloatLE.writeFloatLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>FloatLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeFloatLE.writeFloatLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeFloatLE</span><span class="hl-1">(</span><span class="hl-13">0xcafebabe</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer bb fe 4a 4f></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-55" class="tsd-anchor"></a>Since<a href="#Since-55" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1956</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int16BE</span><a href="#writeInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt16BE.writeInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt16BE.writeInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>The <code>value</code> is interpreted and written as a two's complement signed integer.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">2</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeInt16BE</span><span class="hl-1">(</span><span class="hl-13">0x0102</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 01 02></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-56" class="tsd-anchor"></a>Since<a href="#Since-56" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1892</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int16LE</span><a href="#writeInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt16LE.writeInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt16LE.writeInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>The <code>value</code> is interpreted and written as a two's complement signed integer.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">2</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeInt16LE</span><span class="hl-1">(</span><span class="hl-13">0x0304</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 04 03></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-57" class="tsd-anchor"></a>Since<a href="#Since-57" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1870</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int32BE</span><a href="#writeInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt32BE.writeInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt32BE.writeInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>The <code>value</code> is interpreted and written as a two's complement signed integer.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeInt32BE</span><span class="hl-1">(</span><span class="hl-13">0x01020304</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 01 02 03 04></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-58" class="tsd-anchor"></a>Since<a href="#Since-58" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1936</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int32LE</span><a href="#writeInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt32LE.writeInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt32LE.writeInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>The <code>value</code> is interpreted and written as a two's complement signed integer.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeInt32LE</span><span class="hl-1">(</span><span class="hl-13">0x05060708</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 08 07 06 05></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-59" class="tsd-anchor"></a>Since<a href="#Since-59" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1914</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeInt8" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Int8</span><a href="#writeInt8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeInt8.writeInt8-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Int8</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeInt8.writeInt8-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p><code>value</code> is interpreted and written as a two's complement signed integer.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">2</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeInt8</span><span class="hl-1">(</span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeInt8</span><span class="hl-1">(-</span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 02 fe></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 1</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-60" class="tsd-anchor"></a>Since<a href="#Since-60" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1848</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>IntBE</span><a href="#writeIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeIntBE.writeIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>IntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeIntBE.writeIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeIntBE</span><span class="hl-1">(</span><span class="hl-13">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 12 34 56 78 90 ab></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to write. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-61" class="tsd-anchor"></a>Since<a href="#Since-61" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1165</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>IntLE</span><a href="#writeIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeIntLE.writeIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>IntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeIntLE.writeIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeIntLE</span><span class="hl-1">(</span><span class="hl-13">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer ab 90 78 56 34 12></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to write. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-62" class="tsd-anchor"></a>Since<a href="#Since-62" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.15</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1144</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt16BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt16BE</span><a href="#writeUInt16BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt16BE.writeUInt16BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt16BE.writeUInt16BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>writeUint16BE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt16BE</span><span class="hl-1">(</span><span class="hl-13">0xdead</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt16BE</span><span class="hl-1">(</span><span class="hl-13">0xbeef</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer de ad be ef></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-63" class="tsd-anchor"></a>Since<a href="#Since-63" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1765</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt16LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt16LE</span><a href="#writeUInt16LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt16LE.writeUInt16LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt16LE.writeUInt16LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>writeUint16LE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt16LE</span><span class="hl-1">(</span><span class="hl-13">0xdead</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt16LE</span><span class="hl-1">(</span><span class="hl-13">0xbeef</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer ad de ef be></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 2</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-64" class="tsd-anchor"></a>Since<a href="#Since-64" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1737</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt32BE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt32BE</span><a href="#writeUInt32BE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt32BE.writeUInt32BE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt32BE.writeUInt32BE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>writeUint32BE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt32BE</span><span class="hl-1">(</span><span class="hl-13">0xfeedface</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer fe ed fa ce></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-65" class="tsd-anchor"></a>Since<a href="#Since-65" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1819</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt32LE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt32LE</span><a href="#writeUInt32LE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt32LE.writeUInt32LE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt32LE.writeUInt32LE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>writeUint32LE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt32LE</span><span class="hl-1">(</span><span class="hl-13">0xfeedface</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer ce fa ed fe></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 4</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-66" class="tsd-anchor"></a>Since<a href="#Since-66" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1792</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUInt8" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUInt8</span><a href="#writeUInt8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUInt8.writeUInt8-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUInt8</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUInt8.writeUInt8-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>writeUint8</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">4</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt8</span><span class="hl-1">(</span><span class="hl-13">0x3</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">);</span><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt8</span><span class="hl-1">(</span><span class="hl-13">0x4</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">);</span><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt8</span><span class="hl-1">(</span><span class="hl-13">0x23</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">);</span><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUInt8</span><span class="hl-1">(</span><span class="hl-13">0x42</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 03 04 23 42></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - 1</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-67" class="tsd-anchor"></a>Since<a href="#Since-67" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1709</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUIntBE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUIntBE</span><a href="#writeUIntBE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUIntBE.writeUIntBE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUIntBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUIntBE.writeUIntBE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>writeUintBE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUIntBE</span><span class="hl-1">(</span><span class="hl-13">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer 12 34 56 78 90 ab></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to write. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-68" class="tsd-anchor"></a>Since<a href="#Since-68" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1118</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUIntLE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>writeUIntLE</span><a href="#writeUIntLE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUIntLE.writeUIntLE-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeUIntLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUIntLE.writeUIntLE-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><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>
|
||
<p>This function is also available under the <code>writeUintLE</code> alias.</p>
|
||
<pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'node:buffer'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">writeUIntLE</span><span class="hl-1">(</span><span class="hl-13">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">6</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: <Buffer ab 90 78 56 34 12></span>
|
||
</code><button type="button">Copy</button></pre>
|
||
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number to be written to <code>buf</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to skip before starting to write. Must satisfy <code>0 <= offset <= buf.length - byteLength</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of bytes to write. Must satisfy <code>0 < byteLength <= 6</code>.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p><code>offset</code> plus the number of bytes written.</p>
|
||
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-69" class="tsd-anchor"></a>Since<a href="#Since-69" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.5.5</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1090</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUint16BE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Uint16BE</span><a href="#writeUint16BE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUint16BE-2.writeUint16BE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Uint16BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUint16BE-2.writeUint16BE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-11" class="tsd-anchor"></a>Alias<a href="#Alias-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeUInt16BE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-70" class="tsd-anchor"></a>Since<a href="#Since-70" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1770</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUint16LE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Uint16LE</span><a href="#writeUint16LE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUint16LE-2.writeUint16LE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Uint16LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUint16LE-2.writeUint16LE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-12" class="tsd-anchor"></a>Alias<a href="#Alias-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeUInt16LE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-71" class="tsd-anchor"></a>Since<a href="#Since-71" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1742</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUint32BE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Uint32BE</span><a href="#writeUint32BE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUint32BE-2.writeUint32BE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Uint32BE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUint32BE-2.writeUint32BE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-13" class="tsd-anchor"></a>Alias<a href="#Alias-13" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeUInt32BE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-72" class="tsd-anchor"></a>Since<a href="#Since-72" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1824</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUint32LE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Uint32LE</span><a href="#writeUint32LE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUint32LE-2.writeUint32LE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Uint32LE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUint32LE-2.writeUint32LE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-14" class="tsd-anchor"></a>Alias<a href="#Alias-14" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeUInt32LE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-73" class="tsd-anchor"></a>Since<a href="#Since-73" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1797</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUint8-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Uint8</span><a href="#writeUint8-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUint8-2.writeUint8-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>Uint8</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUint8-2.writeUint8-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-15" class="tsd-anchor"></a>Alias<a href="#Alias-15" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeUInt8</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-74" class="tsd-anchor"></a>Since<a href="#Since-74" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1714</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUintBE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>UintBE</span><a href="#writeUintBE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUintBE-2.writeUintBE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>UintBE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUintBE-2.writeUintBE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-16" class="tsd-anchor"></a>Alias<a href="#Alias-16" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeUIntBE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-75" class="tsd-anchor"></a>Since<a href="#Since-75" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1123</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="writeUintLE-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>UintLE</span><a href="#writeUintLE-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="writeUintLE-2.writeUintLE-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write<wbr/>UintLE</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">offset</span>, <span class="tsd-kind-parameter">byteLength</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#writeUintLE-2.writeUintLE-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span></span></li><li><span><span class="tsd-kind-parameter">byteLength</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Alias-17" class="tsd-anchor"></a>Alias<a href="#Alias-17" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Buffer.writeUIntLE</p>
|
||
<h4 class="tsd-anchor-link"><a id="Since-76" class="tsd-anchor"></a>Since<a href="#Since-76" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v14.9.0, v12.19.0</p>
|
||
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1095</li></ul></aside></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#BYTES_PER_ELEMENT" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>BYTES_<wbr/>PER_<wbr/>ELEMENT</span></a><a href="#_toStringTag_" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[to<wbr/>String<wbr/>Tag]</span></a><a href="#buffer" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>buffer</span></a><a href="#byteLength" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>byte<wbr/>Length</span></a><a href="#byteOffset" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>byte<wbr/>Offset</span></a><a href="#length" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>length</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#_iterator_" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[iterator]</span></a><a href="#at" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>at</span></a><a href="#compare" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compare</span></a><a href="#copy" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a><a href="#copyWithin" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy<wbr/>Within</span></a><a href="#entries" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>entries</span></a><a href="#equals" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>equals</span></a><a href="#every" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>every</span></a><a href="#fill" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>fill</span></a><a href="#filter" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>filter</span></a><a href="#find" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find</span></a><a href="#findIndex" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find<wbr/>Index</span></a><a href="#forEach" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>for<wbr/>Each</span></a><a href="#includes" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>includes</span></a><a href="#indexOf" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>index<wbr/>Of</span></a><a href="#join" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>join</span></a><a href="#keys" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>keys</span></a><a href="#lastIndexOf" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>last<wbr/>Index<wbr/>Of</span></a><a href="#map" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map</span></a><a href="#readBigInt64BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Int64BE</span></a><a href="#readBigInt64LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Int64LE</span></a><a href="#readBigUInt64BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>BigUInt64BE</span></a><a href="#readBigUInt64LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>BigUInt64LE</span></a><a href="#readBigUint64BE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Uint64BE</span></a><a href="#readBigUint64LE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Big<wbr/>Uint64LE</span></a><a href="#readDoubleBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>DoubleBE</span></a><a href="#readDoubleLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>DoubleLE</span></a><a href="#readFloatBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>FloatBE</span></a><a href="#readFloatLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>FloatLE</span></a><a href="#readInt16BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int16BE</span></a><a href="#readInt16LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int16LE</span></a><a href="#readInt32BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int32BE</span></a><a href="#readInt32LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int32LE</span></a><a href="#readInt8" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Int8</span></a><a href="#readIntBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>IntBE</span></a><a href="#readIntLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>IntLE</span></a><a href="#readUInt16BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt16BE</span></a><a href="#readUInt16LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt16LE</span></a><a href="#readUInt32BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt32BE</span></a><a href="#readUInt32LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt32LE</span></a><a href="#readUInt8" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUInt8</span></a><a href="#readUIntBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUIntBE</span></a><a href="#readUIntLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>readUIntLE</span></a><a href="#readUint16BE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint16BE</span></a><a href="#readUint16LE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint16LE</span></a><a href="#readUint32BE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint32BE</span></a><a href="#readUint32LE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint32LE</span></a><a href="#readUint8-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Uint8</span></a><a href="#readUintBE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>UintBE</span></a><a href="#readUintLE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>UintLE</span></a><a href="#reduce" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reduce</span></a><a href="#reduceRight" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reduce<wbr/>Right</span></a><a href="#reverse" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reverse</span></a><a href="#set" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set</span></a><a href="#slice" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>slice</span></a><a href="#some" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>some</span></a><a href="#sort" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sort</span></a><a href="#subarray" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>subarray</span></a><a href="#swap16" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>swap16</span></a><a href="#swap32" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>swap32</span></a><a href="#swap64" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>swap64</span></a><a href="#toJSON" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>toJSON</span></a><a href="#toLocaleString" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Locale<wbr/>String</span></a><a href="#toString" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>String</span></a><a href="#valueOf" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>value<wbr/>Of</span></a><a href="#values" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>values</span></a><a href="#write" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write</span></a><a href="#writeBigInt64BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Int64BE</span></a><a href="#writeBigInt64LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Int64LE</span></a><a href="#writeBigUInt64BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>BigUInt64BE</span></a><a href="#writeBigUInt64LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>BigUInt64LE</span></a><a href="#writeBigUint64BE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Uint64BE</span></a><a href="#writeBigUint64LE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Big<wbr/>Uint64LE</span></a><a href="#writeDoubleBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>DoubleBE</span></a><a href="#writeDoubleLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>DoubleLE</span></a><a href="#writeFloatBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>FloatBE</span></a><a href="#writeFloatLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>FloatLE</span></a><a href="#writeInt16BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int16BE</span></a><a href="#writeInt16LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int16LE</span></a><a href="#writeInt32BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int32BE</span></a><a href="#writeInt32LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int32LE</span></a><a href="#writeInt8" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Int8</span></a><a href="#writeIntBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>IntBE</span></a><a href="#writeIntLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>IntLE</span></a><a href="#writeUInt16BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt16BE</span></a><a href="#writeUInt16LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt16LE</span></a><a href="#writeUInt32BE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt32BE</span></a><a href="#writeUInt32LE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt32LE</span></a><a href="#writeUInt8" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUInt8</span></a><a href="#writeUIntBE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUIntBE</span></a><a href="#writeUIntLE" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>writeUIntLE</span></a><a href="#writeUint16BE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint16BE</span></a><a href="#writeUint16LE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint16LE</span></a><a href="#writeUint32BE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint32BE</span></a><a href="#writeUint32LE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint32LE</span></a><a href="#writeUint8-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Uint8</span></a><a href="#writeUintBE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>UintBE</span></a><a href="#writeUintLE-2" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>UintLE</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>liquidjs</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|