@codebolt/codeboltjs 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/Readme.md +47 -0
  2. package/{modules → dist}/agentlib/agent.js +4 -4
  3. package/{modules → dist}/agentlib/usermessage.js +3 -3
  4. package/dist/utils.d.ts +5 -0
  5. package/{utils.js → dist/utils.js} +4 -4
  6. package/package.json +17 -8
  7. package/.codebolt/chat.json +0 -1
  8. package/.codebolt/debug.json +0 -1
  9. package/.codebolt/projectState.json +0 -127
  10. package/.codebolt/tasks.json +0 -1
  11. package/.codeboltconfig.yaml +0 -0
  12. package/.github/workflows/publish-to-npm.yml +0 -20
  13. package/bkp/toolBox.bkp.ts +0 -1162
  14. package/docs/.nojekyll +0 -1
  15. package/docs/assets/highlight.css +0 -127
  16. package/docs/assets/icons.js +0 -15
  17. package/docs/assets/icons.svg +0 -1
  18. package/docs/assets/main.js +0 -59
  19. package/docs/assets/navigation.js +0 -1
  20. package/docs/assets/search.js +0 -1
  21. package/docs/assets/style.css +0 -1412
  22. package/docs/classes/_internal_.Agent.html +0 -318
  23. package/docs/classes/_internal_.AsyncResource.html +0 -44
  24. package/docs/classes/_internal_.Blob.html +0 -33
  25. package/docs/classes/_internal_.ClientRequest.html +0 -506
  26. package/docs/classes/_internal_.Codebolt.html +0 -315
  27. package/docs/classes/_internal_.CustomEventEmitter-1.html +0 -248
  28. package/docs/classes/_internal_.CustomEventEmitter.html +0 -248
  29. package/docs/classes/_internal_.Duplex.html +0 -690
  30. package/docs/classes/_internal_.EventEmitter-1.html +0 -254
  31. package/docs/classes/_internal_.EventEmitter.EventEmitterAsyncResource.html +0 -268
  32. package/docs/classes/_internal_.IncomingMessage.html +0 -661
  33. package/docs/classes/_internal_.KeyObject.html +0 -76
  34. package/docs/classes/_internal_.OutgoingMessage.html +0 -491
  35. package/docs/classes/_internal_.Readable.html +0 -551
  36. package/docs/classes/_internal_.ReadableBase.html +0 -551
  37. package/docs/classes/_internal_.Server-1.html +0 -416
  38. package/docs/classes/_internal_.Server-2.html +0 -326
  39. package/docs/classes/_internal_.Server-3.html +0 -353
  40. package/docs/classes/_internal_.Server.html +0 -390
  41. package/docs/classes/_internal_.ServerResponse.html +0 -569
  42. package/docs/classes/_internal_.Socket.html +0 -791
  43. package/docs/classes/_internal_.Stream.html +0 -256
  44. package/docs/classes/_internal_.TLSSocket.html +0 -947
  45. package/docs/classes/_internal_.URL.html +0 -140
  46. package/docs/classes/_internal_.URLSearchParams.html +0 -68
  47. package/docs/classes/_internal_.WebSocket-1.html +0 -297
  48. package/docs/classes/_internal_.WebSocket.Server.html +0 -261
  49. package/docs/classes/_internal_.Writable.html +0 -394
  50. package/docs/classes/_internal_.WritableBase.html +0 -394
  51. package/docs/classes/_internal_.X509Certificate.html +0 -144
  52. package/docs/classes/_internal_.internal-1.html +0 -256
  53. package/docs/classes/_internal_.internal.PassThrough.html +0 -686
  54. package/docs/classes/_internal_.internal.Transform.html +0 -693
  55. package/docs/enums/_internal_.logType.html +0 -4
  56. package/docs/functions/_internal_.WebSocket.createWebSocketStream.html +0 -1
  57. package/docs/functions/_internal_._node_stream_consumers_.arrayBuffer.html +0 -1
  58. package/docs/functions/_internal_._node_stream_consumers_.blob.html +0 -1
  59. package/docs/functions/_internal_._node_stream_consumers_.buffer.html +0 -1
  60. package/docs/functions/_internal_._node_stream_consumers_.json.html +0 -1
  61. package/docs/functions/_internal_._node_stream_consumers_.text.html +0 -1
  62. package/docs/functions/_internal_._node_stream_promises_.finished.html +0 -1
  63. package/docs/functions/_internal_._node_stream_promises_.pipeline.html +0 -1
  64. package/docs/functions/_internal_.internal.addAbortSignal.html +0 -17
  65. package/docs/functions/_internal_.internal.finished-1.html +0 -20
  66. package/docs/functions/_internal_.internal.finished.__promisify__.html +0 -1
  67. package/docs/functions/_internal_.internal.getDefaultHighWaterMark.html +0 -4
  68. package/docs/functions/_internal_.internal.isErrored.html +0 -3
  69. package/docs/functions/_internal_.internal.isReadable.html +0 -3
  70. package/docs/functions/_internal_.internal.pipeline-1.html +0 -24
  71. package/docs/functions/_internal_.internal.pipeline.__promisify__.html +0 -1
  72. package/docs/functions/_internal_.internal.setDefaultHighWaterMark.html +0 -4
  73. package/docs/hierarchy.html +0 -1
  74. package/docs/index.html +0 -12
  75. package/docs/interfaces/_internal_.AddToAgentStateResponse.html +0 -3
  76. package/docs/interfaces/_internal_.AddTokenResponse.html +0 -3
  77. package/docs/interfaces/_internal_.AddVectorItemResponse.html +0 -3
  78. package/docs/interfaces/_internal_.AddressInfo.html +0 -4
  79. package/docs/interfaces/_internal_.AgentOptions.html +0 -35
  80. package/docs/interfaces/_internal_.ApplicationState.html +0 -4
  81. package/docs/interfaces/_internal_.ArrayBufferView.html +0 -7
  82. package/docs/interfaces/_internal_.ArrayLike.html +0 -2
  83. package/docs/interfaces/_internal_.ArrayOptions.html +0 -7
  84. package/docs/interfaces/_internal_.AsymmetricKeyDetails.html +0 -15
  85. package/docs/interfaces/_internal_.AsyncGenerator.html +0 -5
  86. package/docs/interfaces/_internal_.AsyncGeneratorFunction.html +0 -12
  87. package/docs/interfaces/_internal_.AsyncIterable.html +0 -2
  88. package/docs/interfaces/_internal_.AsyncIterableIterator.html +0 -5
  89. package/docs/interfaces/_internal_.AsyncIterator.html +0 -4
  90. package/docs/interfaces/_internal_.AsyncResourceOptions.html +0 -12
  91. package/docs/interfaces/_internal_.BlobOptions.html +0 -8
  92. package/docs/interfaces/_internal_.Buffer.html +0 -760
  93. package/docs/interfaces/_internal_.BufferConstructor.html +0 -165
  94. package/docs/interfaces/_internal_.Certificate.html +0 -13
  95. package/docs/interfaces/_internal_.ChatMessage.html +0 -3
  96. package/docs/interfaces/_internal_.Choice.html +0 -5
  97. package/docs/interfaces/_internal_.CipherNameAndProtocol.html +0 -7
  98. package/docs/interfaces/_internal_.ClientRequestArgs.html +0 -28
  99. package/docs/interfaces/_internal_.CommandError.html +0 -3
  100. package/docs/interfaces/_internal_.CommonConnectionOptions.html +0 -29
  101. package/docs/interfaces/_internal_.ConnectOpts.html +0 -5
  102. package/docs/interfaces/_internal_.CreateFileResponse.html +0 -6
  103. package/docs/interfaces/_internal_.CreateFolderResponse.html +0 -6
  104. package/docs/interfaces/_internal_.CryptoKey.html +0 -26
  105. package/docs/interfaces/_internal_.DebugAddLogResponse.html +0 -4
  106. package/docs/interfaces/_internal_.DeleteFileResponse.html +0 -6
  107. package/docs/interfaces/_internal_.DeleteFolderResponse.html +0 -6
  108. package/docs/interfaces/_internal_.DetailedPeerCertificate.html +0 -53
  109. package/docs/interfaces/_internal_.Dict.html +0 -1
  110. package/docs/interfaces/_internal_.Disposable.html +0 -2
  111. package/docs/interfaces/_internal_.DropArgument.html +0 -7
  112. package/docs/interfaces/_internal_.DuplexOptions.html +0 -22
  113. package/docs/interfaces/_internal_.EphemeralKeyInfo.html +0 -7
  114. package/docs/interfaces/_internal_.ErrnoException.html +0 -8
  115. package/docs/interfaces/_internal_.Error.html +0 -4
  116. package/docs/interfaces/_internal_.EventEmitter-2.html +0 -130
  117. package/docs/interfaces/_internal_.EventEmitter.Abortable.html +0 -3
  118. package/docs/interfaces/_internal_.EventEmitter.EventEmitterAsyncResourceOptions.html +0 -19
  119. package/docs/interfaces/_internal_.EventEmitter.EventEmitterReferencingAsyncResource.html +0 -32
  120. package/docs/interfaces/_internal_.EventEmitterOptions.html +0 -3
  121. package/docs/interfaces/_internal_.ExtractTextResponse.html +0 -3
  122. package/docs/interfaces/_internal_.GetAgentStateResponse.html +0 -3
  123. package/docs/interfaces/_internal_.GetContentResponse.html +0 -3
  124. package/docs/interfaces/_internal_.GetMarkdownResponse.html +0 -3
  125. package/docs/interfaces/_internal_.GetMatcherListTreeResponse.html +0 -3
  126. package/docs/interfaces/_internal_.GetProjectPathResponse.html +0 -5
  127. package/docs/interfaces/_internal_.GetTokenResponse.html +0 -3
  128. package/docs/interfaces/_internal_.GetVectorResponse.html +0 -3
  129. package/docs/interfaces/_internal_.GoToPageResponse.html +0 -3
  130. package/docs/interfaces/_internal_.HtmlReceived.html +0 -3
  131. package/docs/interfaces/_internal_.IncomingHttpHeaders.html +0 -64
  132. package/docs/interfaces/_internal_.InformationEvent.html +0 -8
  133. package/docs/interfaces/_internal_.IpcSocketConnectOpts.html +0 -6
  134. package/docs/interfaces/_internal_.Iterable.html +0 -2
  135. package/docs/interfaces/_internal_.IterableIterator.html +0 -5
  136. package/docs/interfaces/_internal_.Iterator.html +0 -4
  137. package/docs/interfaces/_internal_.IteratorReturnResult.html +0 -3
  138. package/docs/interfaces/_internal_.IteratorYieldResult.html +0 -3
  139. package/docs/interfaces/_internal_.JsonWebKey.html +0 -14
  140. package/docs/interfaces/_internal_.JwkKeyExportOptions.html +0 -2
  141. package/docs/interfaces/_internal_.KeyAlgorithm.html +0 -2
  142. package/docs/interfaces/_internal_.KeyExportOptions.html +0 -5
  143. package/docs/interfaces/_internal_.KeyObject-1.html +0 -5
  144. package/docs/interfaces/_internal_.LLMResponse.html +0 -4
  145. package/docs/interfaces/_internal_.ListenOptions.html +0 -13
  146. package/docs/interfaces/_internal_.LookupAddress.html +0 -6
  147. package/docs/interfaces/_internal_.LookupOptions.html +0 -27
  148. package/docs/interfaces/_internal_.MatchProblemResponse.html +0 -3
  149. package/docs/interfaces/_internal_.MemoryGetResponse.html +0 -5
  150. package/docs/interfaces/_internal_.MemorySetResponse.html +0 -5
  151. package/docs/interfaces/_internal_.Message.html +0 -8
  152. package/docs/interfaces/_internal_.MessageContent.html +0 -3
  153. package/docs/interfaces/_internal_.Object.html +0 -18
  154. package/docs/interfaces/_internal_.OnReadOpts.html +0 -6
  155. package/docs/interfaces/_internal_.OpenDebugBrowserResponse.html +0 -4
  156. package/docs/interfaces/_internal_.OutgoingHttpHeaders.html +0 -80
  157. package/docs/interfaces/_internal_.PeerCertificate.html +0 -50
  158. package/docs/interfaces/_internal_.PromiseLike.html +0 -6
  159. package/docs/interfaces/_internal_.PxfObject.html +0 -5
  160. package/docs/interfaces/_internal_.QueryVectorItemResponse.html +0 -3
  161. package/docs/interfaces/_internal_.QueuingStrategy.html +0 -3
  162. package/docs/interfaces/_internal_.QueuingStrategySize.html +0 -1
  163. package/docs/interfaces/_internal_.ReadFileResponse.html +0 -7
  164. package/docs/interfaces/_internal_.ReadOnlyDict.html +0 -1
  165. package/docs/interfaces/_internal_.ReadWriteStream.html +0 -144
  166. package/docs/interfaces/_internal_.ReadableByteStreamController.html +0 -6
  167. package/docs/interfaces/_internal_.ReadableByteStreamControllerCallback.html +0 -1
  168. package/docs/interfaces/_internal_.ReadableOptions.html +0 -11
  169. package/docs/interfaces/_internal_.ReadableStream-1.html +0 -141
  170. package/docs/interfaces/_internal_.ReadableStream.html +0 -10
  171. package/docs/interfaces/_internal_.ReadableStreamBYOBReader.html +0 -5
  172. package/docs/interfaces/_internal_.ReadableStreamDefaultController.html +0 -5
  173. package/docs/interfaces/_internal_.ReadableStreamDefaultReadDoneResult.html +0 -3
  174. package/docs/interfaces/_internal_.ReadableStreamDefaultReadValueResult.html +0 -3
  175. package/docs/interfaces/_internal_.ReadableStreamDefaultReader.html +0 -5
  176. package/docs/interfaces/_internal_.ReadableStreamErrorCallback.html +0 -1
  177. package/docs/interfaces/_internal_.ReadableStreamGenericReader.html +0 -3
  178. package/docs/interfaces/_internal_.ReadableStreamReadDoneResult.html +0 -3
  179. package/docs/interfaces/_internal_.ReadableStreamReadValueResult.html +0 -3
  180. package/docs/interfaces/_internal_.ReadableWritablePair.html +0 -9
  181. package/docs/interfaces/_internal_.SecureContext.html +0 -2
  182. package/docs/interfaces/_internal_.SecureContextOptions.html +0 -121
  183. package/docs/interfaces/_internal_.Selection.html +0 -6
  184. package/docs/interfaces/_internal_.ServerOptions.html +0 -64
  185. package/docs/interfaces/_internal_.ServerOpts.html +0 -25
  186. package/docs/interfaces/_internal_.SharedArrayBuffer.html +0 -7
  187. package/docs/interfaces/_internal_.SharedArrayBufferConstructor.html +0 -3
  188. package/docs/interfaces/_internal_.SocketConstructorOpts.html +0 -6
  189. package/docs/interfaces/_internal_.StaticEventEmitterOptions.html +0 -15
  190. package/docs/interfaces/_internal_.StreamOptions.html +0 -9
  191. package/docs/interfaces/_internal_.StreamPipeOptions.html +0 -37
  192. package/docs/interfaces/_internal_.TLSSocketOptions.html +0 -160
  193. package/docs/interfaces/_internal_.TcpSocketConnectOpts.html +0 -19
  194. package/docs/interfaces/_internal_.TerminalInterruptResponse.html +0 -3
  195. package/docs/interfaces/_internal_.TlsOptions.html +0 -197
  196. package/docs/interfaces/_internal_.UnderlyingByteSource.html +0 -6
  197. package/docs/interfaces/_internal_.UnderlyingSink.html +0 -6
  198. package/docs/interfaces/_internal_.UnderlyingSinkAbortCallback.html +0 -1
  199. package/docs/interfaces/_internal_.UnderlyingSinkCloseCallback.html +0 -1
  200. package/docs/interfaces/_internal_.UnderlyingSinkStartCallback.html +0 -1
  201. package/docs/interfaces/_internal_.UnderlyingSinkWriteCallback.html +0 -1
  202. package/docs/interfaces/_internal_.UnderlyingSource.html +0 -5
  203. package/docs/interfaces/_internal_.UnderlyingSourceCancelCallback.html +0 -1
  204. package/docs/interfaces/_internal_.UnderlyingSourcePullCallback.html +0 -1
  205. package/docs/interfaces/_internal_.UnderlyingSourceStartCallback.html +0 -1
  206. package/docs/interfaces/_internal_.UpdateFileResponse.html +0 -6
  207. package/docs/interfaces/_internal_.UrlResponse.html +0 -3
  208. package/docs/interfaces/_internal_.Usage-1.html +0 -4
  209. package/docs/interfaces/_internal_.Usage.html +0 -4
  210. package/docs/interfaces/_internal_.UserMessage.html +0 -3
  211. package/docs/interfaces/_internal_.UserRequest.html +0 -7
  212. package/docs/interfaces/_internal_.WebSocket.AddressInfo.html +0 -4
  213. package/docs/interfaces/_internal_.WebSocket.ClientOptions.html +0 -138
  214. package/docs/interfaces/_internal_.WebSocket.CloseEvent.html +0 -6
  215. package/docs/interfaces/_internal_.WebSocket.ErrorEvent.html +0 -5
  216. package/docs/interfaces/_internal_.WebSocket.Event.html +0 -3
  217. package/docs/interfaces/_internal_.WebSocket.EventListenerOptions.html +0 -2
  218. package/docs/interfaces/_internal_.WebSocket.MessageEvent.html +0 -4
  219. package/docs/interfaces/_internal_.WebSocket.PerMessageDeflateOptions.html +0 -9
  220. package/docs/interfaces/_internal_.WebSocket.ServerOptions.html +0 -14
  221. package/docs/interfaces/_internal_.WebSocket.WebSocket.html +0 -172
  222. package/docs/interfaces/_internal_.WebSocket.WebSocketServer.html +0 -144
  223. package/docs/interfaces/_internal_.WebSocketAlias.html +0 -172
  224. package/docs/interfaces/_internal_.WritableOptions.html +0 -14
  225. package/docs/interfaces/_internal_.WritableStream-1.html +0 -8
  226. package/docs/interfaces/_internal_.WritableStream.html +0 -133
  227. package/docs/interfaces/_internal_.WritableStreamDefaultController.html +0 -6
  228. package/docs/interfaces/_internal_.WritableStreamDefaultWriter.html +0 -12
  229. package/docs/interfaces/_internal_.X509CheckOptions.html +0 -16
  230. package/docs/interfaces/_internal_.ZlibOptions.html +0 -21
  231. package/docs/interfaces/_internal_.getMatchDetail.html +0 -3
  232. package/docs/interfaces/_internal_.internal.FinishedOptions.html +0 -6
  233. package/docs/interfaces/_internal_.internal.Pipe.html +0 -5
  234. package/docs/interfaces/_internal_.internal.PipelineOptions.html +0 -3
  235. package/docs/interfaces/_internal_.internal.TransformOptions.html +0 -24
  236. package/docs/modules/_internal_.EventEmitter.html +0 -6
  237. package/docs/modules/_internal_.WebSocket.html +0 -21
  238. package/docs/modules/_internal_._node_stream_consumers_.html +0 -6
  239. package/docs/modules/_internal_._node_stream_promises_.html +0 -3
  240. package/docs/modules/_internal_.html +0 -228
  241. package/docs/modules/_internal_.internal.finished.html +0 -2
  242. package/docs/modules/_internal_.internal.html +0 -36
  243. package/docs/modules/_internal_.internal.pipeline.html +0 -2
  244. package/docs/modules.html +0 -3
  245. package/docs/types/_internal_.AnyRest.html +0 -1
  246. package/docs/types/_internal_.Args.html +0 -1
  247. package/docs/types/_internal_.ArrayBufferLike.html +0 -1
  248. package/docs/types/_internal_.ArrayBufferView-1.html +0 -1
  249. package/docs/types/_internal_.BinaryLike.html +0 -1
  250. package/docs/types/_internal_.BufferEncoding.html +0 -1
  251. package/docs/types/_internal_.BufferLike.html +0 -1
  252. package/docs/types/_internal_.ComposeFnParam.html +0 -1
  253. package/docs/types/_internal_.DefaultEventMap.html +0 -1
  254. package/docs/types/_internal_.EventMap.html +0 -1
  255. package/docs/types/_internal_.InstanceType.html +0 -2
  256. package/docs/types/_internal_.IteratorResult.html +0 -1
  257. package/docs/types/_internal_.Key.html +0 -1
  258. package/docs/types/_internal_.Key2.html +0 -1
  259. package/docs/types/_internal_.KeyFormat.html +0 -1
  260. package/docs/types/_internal_.KeyObjectType.html +0 -1
  261. package/docs/types/_internal_.KeyType-1.html +0 -1
  262. package/docs/types/_internal_.KeyType.html +0 -1
  263. package/docs/types/_internal_.KeyUsage.html +0 -1
  264. package/docs/types/_internal_.Listener.html +0 -1
  265. package/docs/types/_internal_.LookupFunction.html +0 -1
  266. package/docs/types/_internal_.OutgoingHttpHeader.html +0 -1
  267. package/docs/types/_internal_.Partial.html +0 -2
  268. package/docs/types/_internal_.Pick.html +0 -2
  269. package/docs/types/_internal_.PropertyKey.html +0 -1
  270. package/docs/types/_internal_.ReadableStreamController.html +0 -1
  271. package/docs/types/_internal_.ReadableStreamDefaultReadResult.html +0 -1
  272. package/docs/types/_internal_.ReadableStreamReadResult.html +0 -1
  273. package/docs/types/_internal_.Record.html +0 -2
  274. package/docs/types/_internal_.RequestListener.html +0 -1
  275. package/docs/types/_internal_.SecureVersion.html +0 -1
  276. package/docs/types/_internal_.ServerOptions-1.html +0 -1
  277. package/docs/types/_internal_.SocketConnectOpts.html +0 -1
  278. package/docs/types/_internal_.SocketReadyState.html +0 -1
  279. package/docs/types/_internal_.TypedArray.html +0 -1
  280. package/docs/types/_internal_.WebSocket.CertMeta.html +0 -2
  281. package/docs/types/_internal_.WebSocket.Data.html +0 -2
  282. package/docs/types/_internal_.WebSocket.RawData.html +0 -2
  283. package/docs/types/_internal_.WebSocket.VerifyClientCallbackAsync.html +0 -4
  284. package/docs/types/_internal_.WebSocket.VerifyClientCallbackSync.html +0 -4
  285. package/docs/types/_internal_.WithImplicitCoercion.html +0 -1
  286. package/docs/types/_internal_.internal.PipelineCallback.html +0 -1
  287. package/docs/types/_internal_.internal.PipelineDestination.html +0 -1
  288. package/docs/types/_internal_.internal.PipelineDestinationIterableFunction.html +0 -1
  289. package/docs/types/_internal_.internal.PipelineDestinationPromiseFunction.html +0 -1
  290. package/docs/types/_internal_.internal.PipelinePromise.html +0 -1
  291. package/docs/types/_internal_.internal.PipelineSource.html +0 -1
  292. package/docs/types/_internal_.internal.PipelineSourceFunction.html +0 -1
  293. package/docs/types/_internal_.internal.PipelineTransform.html +0 -1
  294. package/docs/types/_internal_.internal.PipelineTransformSource.html +0 -1
  295. package/docs/types/_internal_.internal.TransformCallback.html +0 -1
  296. package/docs/variables/_internal_.Buffer-1.html +0 -1
  297. package/docs/variables/_internal_.Error-1.html +0 -1
  298. package/docs/variables/_internal_.Object-1.html +0 -2
  299. package/docs/variables/_internal_.ReadableByteStreamController-1.html +0 -1
  300. package/docs/variables/_internal_.ReadableStream-2.html +0 -1
  301. package/docs/variables/_internal_.ReadableStreamBYOBReader-1.html +0 -1
  302. package/docs/variables/_internal_.ReadableStreamDefaultController-1.html +0 -1
  303. package/docs/variables/_internal_.ReadableStreamDefaultReader-1.html +0 -1
  304. package/docs/variables/_internal_.SharedArrayBuffer-1.html +0 -1
  305. package/docs/variables/_internal_.WebSocket.WebSocket-1.html +0 -1
  306. package/docs/variables/_internal_.WebSocket.WebSocketServer-1.html +0 -1
  307. package/docs/variables/_internal_.WebSocketAlias-1.html +0 -1
  308. package/docs/variables/_internal_.WritableStream-2.html +0 -1
  309. package/docs/variables/_internal_.WritableStreamDefaultController-1.html +0 -1
  310. package/docs/variables/_internal_.WritableStreamDefaultWriter-1.html +0 -1
  311. package/docs/variables/_internal_.internal.consumers.html +0 -1
  312. package/docs/variables/_internal_.internal.promises.html +0 -1
  313. package/docs/variables/default.html +0 -1
  314. package/script/gen.js +0 -27
  315. package/src/index.ts +0 -108
  316. package/src/modules/agent.ts +0 -120
  317. package/src/modules/agentlib/agent.ts +0 -417
  318. package/src/modules/agentlib/systemprompt.ts +0 -55
  319. package/src/modules/agentlib/taskInstruction.ts +0 -105
  320. package/src/modules/agentlib/usermessage.ts +0 -188
  321. package/src/modules/browser.ts +0 -352
  322. package/src/modules/chat.ts +0 -229
  323. package/src/modules/codeparsers.ts +0 -28
  324. package/src/modules/codeutils.ts +0 -182
  325. package/src/modules/crawler.ts +0 -121
  326. package/src/modules/dbmemory.ts +0 -52
  327. package/src/modules/debug.ts +0 -68
  328. package/src/modules/docutils.ts +0 -18
  329. package/src/modules/fs.ts +0 -263
  330. package/src/modules/git.ts +0 -237
  331. package/src/modules/history.ts +0 -82
  332. package/src/modules/knowledge.ts +0 -5
  333. package/src/modules/llm.ts +0 -36
  334. package/src/modules/outputparsers.ts +0 -30
  335. package/src/modules/project.ts +0 -68
  336. package/src/modules/rag.ts +0 -27
  337. package/src/modules/search.ts +0 -32
  338. package/src/modules/state.ts +0 -115
  339. package/src/modules/task.ts +0 -73
  340. package/src/modules/terminal.ts +0 -113
  341. package/src/modules/tokenizer.ts +0 -56
  342. package/src/modules/toolBox.ts +0 -1384
  343. package/src/modules/tools.ts +0 -254
  344. package/src/modules/vectordb.ts +0 -102
  345. package/src/modules/websocket.ts +0 -97
  346. package/src/utils/editFile.ts +0 -30
  347. package/src/utils.ts +0 -5
  348. package/tests/chat.test.js +0 -0
  349. package/tests/fs.test.js +0 -89
  350. package/tests/index.test.js +0 -4
  351. package/tsconfig.json +0 -122
  352. package/utils.d.ts +0 -5
  353. package/webpack.config.js +0 -25
  354. /package/{modules → dist}/agentlib/agent.d.ts +0 -0
  355. /package/{modules → dist}/agentlib/systemprompt.d.ts +0 -0
  356. /package/{modules → dist}/agentlib/systemprompt.js +0 -0
  357. /package/{modules → dist}/agentlib/taskInstruction.d.ts +0 -0
  358. /package/{modules → dist}/agentlib/taskInstruction.js +0 -0
  359. /package/{modules → dist}/agentlib/usermessage.d.ts +0 -0
  360. /package/{index.d.ts → dist/index.d.ts} +0 -0
  361. /package/{index.js → dist/index.js} +0 -0
  362. /package/{modules → dist/modules}/agent.d.ts +0 -0
  363. /package/{modules → dist/modules}/agent.js +0 -0
  364. /package/{modules → dist/modules}/browser.d.ts +0 -0
  365. /package/{modules → dist/modules}/browser.js +0 -0
  366. /package/{modules → dist/modules}/chat.d.ts +0 -0
  367. /package/{modules → dist/modules}/chat.js +0 -0
  368. /package/{modules → dist/modules}/codeparsers.d.ts +0 -0
  369. /package/{modules → dist/modules}/codeparsers.js +0 -0
  370. /package/{modules → dist/modules}/codeutils.d.ts +0 -0
  371. /package/{modules → dist/modules}/codeutils.js +0 -0
  372. /package/{modules → dist/modules}/crawler.d.ts +0 -0
  373. /package/{modules → dist/modules}/crawler.js +0 -0
  374. /package/{modules → dist/modules}/dbmemory.d.ts +0 -0
  375. /package/{modules → dist/modules}/dbmemory.js +0 -0
  376. /package/{modules → dist/modules}/debug.d.ts +0 -0
  377. /package/{modules → dist/modules}/debug.js +0 -0
  378. /package/{modules → dist/modules}/docutils.d.ts +0 -0
  379. /package/{modules → dist/modules}/docutils.js +0 -0
  380. /package/{modules → dist/modules}/fs.d.ts +0 -0
  381. /package/{modules → dist/modules}/fs.js +0 -0
  382. /package/{modules → dist/modules}/git.d.ts +0 -0
  383. /package/{modules → dist/modules}/git.js +0 -0
  384. /package/{modules → dist/modules}/history.d.ts +0 -0
  385. /package/{modules → dist/modules}/history.js +0 -0
  386. /package/{modules → dist/modules}/knowledge.d.ts +0 -0
  387. /package/{modules → dist/modules}/knowledge.js +0 -0
  388. /package/{modules → dist/modules}/llm.d.ts +0 -0
  389. /package/{modules → dist/modules}/llm.js +0 -0
  390. /package/{modules → dist/modules}/outputparsers.d.ts +0 -0
  391. /package/{modules → dist/modules}/outputparsers.js +0 -0
  392. /package/{modules → dist/modules}/project.d.ts +0 -0
  393. /package/{modules → dist/modules}/project.js +0 -0
  394. /package/{modules → dist/modules}/rag.d.ts +0 -0
  395. /package/{modules → dist/modules}/rag.js +0 -0
  396. /package/{modules → dist/modules}/search.d.ts +0 -0
  397. /package/{modules → dist/modules}/search.js +0 -0
  398. /package/{modules → dist/modules}/state.d.ts +0 -0
  399. /package/{modules → dist/modules}/state.js +0 -0
  400. /package/{modules → dist/modules}/task.d.ts +0 -0
  401. /package/{modules → dist/modules}/task.js +0 -0
  402. /package/{modules → dist/modules}/terminal.d.ts +0 -0
  403. /package/{modules → dist/modules}/terminal.js +0 -0
  404. /package/{modules → dist/modules}/tokenizer.d.ts +0 -0
  405. /package/{modules → dist/modules}/tokenizer.js +0 -0
  406. /package/{modules → dist/modules}/toolBox.d.ts +0 -0
  407. /package/{modules → dist/modules}/toolBox.js +0 -0
  408. /package/{modules → dist/modules}/tools.d.ts +0 -0
  409. /package/{modules → dist/modules}/tools.js +0 -0
  410. /package/{modules → dist/modules}/vectordb.d.ts +0 -0
  411. /package/{modules → dist/modules}/vectordb.js +0 -0
  412. /package/{modules → dist/modules}/websocket.d.ts +0 -0
  413. /package/{modules → dist/modules}/websocket.js +0 -0
  414. /package/{utils → dist/utils}/editFile.d.ts +0 -0
  415. /package/{utils → dist/utils}/editFile.js +0 -0
@@ -1,760 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Buffer | @codebolt/codeboltjs</title><meta name="description" content="Documentation for @codebolt/codeboltjs"/><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">@codebolt/codeboltjs</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">@codebolt/codeboltjs</a></li><li><a href="../modules/_internal_.html">&lt;internal&gt;</a></li><li><a href="_internal_.Buffer.html">Buffer</a></li></ul><h1>Interface Buffer</h1></div><div 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">&quot;Uint8Array&quot;</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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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-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-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><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-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><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-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><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">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span><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-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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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-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><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-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><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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-kind-parameter">byteLength</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-kind-parameter">byteLength</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-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-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-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-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-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-kind-parameter">byteLength</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-kind-parameter">byteLength</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-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-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-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-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-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-kind-parameter">byteLength</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-kind-parameter">byteLength</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-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-kind-parameter">initialValue</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">&lt;</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">&gt;</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><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-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-kind-parameter">initialValue</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">&lt;</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">&gt;</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><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-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><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-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><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-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><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-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-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><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">&quot;Buffer&quot;</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>, <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><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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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-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><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:632</li><li>Defined in node_modules/@types/node/buffer.d.ts:2315</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-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>
2
- <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>
3
- <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>
4
- <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>
5
- <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>
6
- <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>
7
- </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>
8
- <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>
9
- <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>
10
- <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>
11
- <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>
12
- <a href="_internal_.Buffer.html#entries" 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>entries</span></a>
13
- <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>
14
- <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>
15
- <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>
16
- <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>
17
- <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>
18
- <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>
19
- <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>
20
- <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>
21
- <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>
22
- <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>
23
- <a href="_internal_.Buffer.html#keys" 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>keys</span></a>
24
- <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>
25
- <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>
26
- <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>
27
- <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>
28
- <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>
29
- <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>
30
- <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>
31
- <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>
32
- <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>
33
- <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>
34
- <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>
35
- <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>
36
- <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>
37
- <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>
38
- <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>
39
- <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>
40
- <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>
41
- <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>
42
- <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>
43
- <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>
44
- <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>
45
- <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>
46
- <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>
47
- <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>
48
- <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>
49
- <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>
50
- <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>
51
- <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>
52
- <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>
53
- <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>
54
- <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>
55
- <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>
56
- <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>
57
- <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>
58
- <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>
59
- <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>
60
- <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>
61
- <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>
62
- <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>
63
- <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>
64
- <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>
65
- <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>
66
- <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>
67
- <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>
68
- <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>
69
- <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>
70
- <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>
71
- <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>
72
- <a href="_internal_.Buffer.html#values" 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>values</span></a>
73
- <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>
74
- <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>
75
- <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>
76
- <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>
77
- <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>
78
- <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>
79
- <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>
80
- <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>
81
- <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>
82
- <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>
83
- <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>
84
- <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>
85
- <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>
86
- <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>
87
- <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>
88
- <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>
89
- <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>
90
- <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>
91
- <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>
92
- <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>
93
- <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>
94
- <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>
95
- <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>
96
- <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>
97
- <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>
98
- <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>
99
- <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>
100
- <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>
101
- <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>
102
- <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>
103
- <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>
104
- <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>
105
- </div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><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 ts-flagReadonly">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>
106
- </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:2161</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 ts-flagReadonly">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">&quot;Uint8Array&quot;</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:284</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 ts-flagReadonly">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>
107
- </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:2166</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 ts-flagReadonly">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>
108
- </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:2171</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 ts-flagReadonly">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>
109
- </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:2176</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 ts-flagReadonly">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>
110
- </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:2275</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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:270</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,
111
- allowing for positive and negative integers.
112
- Negative integers count back from the last item in the array.</p>
113
- </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:131</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.
114
- Comparison is based on the actual sequence of bytes in each <code>Buffer</code>.</p>
115
- <ul>
116
- <li><code>0</code> is returned if <code>target</code> is the same as <code>buf</code></li>
117
- <li><code>1</code> is returned if <code>target</code> should come <em>before</em><code>buf</code> when sorted.</li>
118
- <li><code>-1</code> is returned if <code>target</code> should come <em>after</em><code>buf</code> when sorted.</li>
119
- </ul>
120
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;ABC&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;BCD&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf3</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;ABCD&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf3</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf3</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">([</span><span class="hl-7">buf1</span><span class="hl-1">, </span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-7">buf3</span><span class="hl-1">].</span><span class="hl-0">sort</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-7">compare</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: [ &lt;Buffer 41 42 43&gt;, &lt;Buffer 41 42 43 44&gt;, &lt;Buffer 42 43 44&gt; ]</span><br/><span class="hl-5">// (This result is equal to: [buf1, buf3, buf2].)</span>
121
- </code><button>Copy</button></pre>
122
- <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>
123
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">7</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">, </span><span class="hl-9">9</span><span class="hl-1">]);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">7</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">, </span><span class="hl-9">9</span><span class="hl-1">, </span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">9</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">compare</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1</span>
124
- </code><button>Copy</button></pre>
125
- <p><code>ERR_OUT_OF_RANGE</code> is thrown if <code>targetStart &lt; 0</code>, <code>sourceStart &lt; 0</code>, <code>targetEnd &gt; target.byteLength</code>, or <code>sourceEnd &gt; source.byteLength</code>.</p>
126
- </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>
127
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
128
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
129
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
130
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
131
- </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>Since</h4><p>v0.11.13</p>
132
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:808</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>
133
- <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
134
- for all TypedArrays, including Node.js <code>Buffer</code>s, although it takes
135
- different function arguments.</p>
136
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Create two `Buffer` instances.</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">26</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">26</span><span class="hl-1">).</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;!&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">i</span><span class="hl-1"> = </span><span class="hl-9">0</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1"> &lt; </span><span class="hl-9">26</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-1"> </span><span class="hl-7">buf1</span><span class="hl-1">[</span><span class="hl-7">i</span><span class="hl-1">] = </span><span class="hl-7">i</span><span class="hl-1"> + </span><span class="hl-9">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-5">// Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.</span><br/><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">copy</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">, </span><span class="hl-9">16</span><span class="hl-1">, </span><span class="hl-9">20</span><span class="hl-1">);</span><br/><span class="hl-5">// This is equivalent to:</span><br/><span class="hl-5">// buf2.set(buf1.subarray(16, 20), 8);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-2">&#39;ascii&#39;</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">25</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: !!!!!!!!qrst!!!!!!!!!!!!!</span>
137
- </code><button>Copy</button></pre>
138
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Create a `Buffer` and copy data from one region to an overlapping region</span><br/><span class="hl-5">// within the same `Buffer`.</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">26</span><span class="hl-1">);</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">i</span><span class="hl-1"> = </span><span class="hl-9">0</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1"> &lt; </span><span class="hl-9">26</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-1"> </span><span class="hl-7">buf</span><span class="hl-1">[</span><span class="hl-7">i</span><span class="hl-1">] = </span><span class="hl-7">i</span><span class="hl-1"> + </span><span class="hl-9">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">copy</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-9">10</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: efghijghijklmnopqrstuvwxyz</span>
139
- </code><button>Copy</button></pre>
140
- </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>
141
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
142
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
143
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
144
- </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>
145
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
146
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:868</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
147
- to the same array starting at position target</p>
148
- </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
149
- length of the array.</p>
150
- </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
151
- is treated as length+end.</p>
152
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
153
- </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:2187</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member 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-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">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span><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>Creates and returns an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterator</a> of <code>[index, byte]</code> pairs from the contents
154
- of <code>buf</code>.</p>
155
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Log the entire contents of a `Buffer`.</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pair</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">entries</span><span class="hl-1">()) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">pair</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// [0, 98]</span><br/><span class="hl-5">// [1, 117]</span><br/><span class="hl-5">// [2, 102]</span><br/><span class="hl-5">// [3, 102]</span><br/><span class="hl-5">// [4, 101]</span><br/><span class="hl-5">// [5, 114]</span>
156
- </code><button>Copy</button></pre>
157
- </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">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v1.1.0</p>
158
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.entries</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2227</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>
159
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;ABC&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;414243&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;hex&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf3</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;ABCD&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">equals</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">equals</span><span class="hl-1">(</span><span class="hl-7">buf3</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: false</span>
160
- </code><button>Copy</button></pre>
161
- </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>
162
- </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>Since</h4><p>v0.11.13</p>
163
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:753</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>
164
- </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-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </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
165
- the predicate function for each element in the array until the predicate returns a value
166
- which is coercible to the Boolean value false, or until the end of the array.</p>
167
- </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 ts-flagOptional">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.
168
- If thisArg is omitted, undefined is used as the this value.</p>
169
- </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:2197</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,
170
- the entire <code>buf</code> will be filled:</p>
171
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Fill a `Buffer` with the ASCII character &#39;h&#39;.</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">b</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">50</span><span class="hl-1">).</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;h&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh</span><br/><br/><span class="hl-5">// Fill a buffer with empty string</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">c</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">5</span><span class="hl-1">).</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">c</span><span class="hl-1">.</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: &lt;Buffer 00 00 00 00 00&gt;</span>
172
- </code><button>Copy</button></pre>
173
- <p><code>value</code> is coerced to a <code>uint32</code> value if it is not a string, <code>Buffer</code>, or
174
- integer. If the resulting integer is greater than <code>255</code> (decimal), <code>buf</code> will be
175
- filled with <code>value &amp;#x26; 255</code>.</p>
176
- <p>If the final write of a <code>fill()</code> operation falls on a multi-byte character,
177
- then only the bytes of that character that fit into <code>buf</code> are written:</p>
178
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Fill a `Buffer` with character that takes up two bytes in UTF-8.</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">5</span><span class="hl-1">).</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u0222</span><span class="hl-2">&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: &lt;Buffer c8 a2 c8 a2 c8&gt;</span>
179
- </code><button>Copy</button></pre>
180
- <p>If <code>value</code> contains invalid characters, it is truncated; if no valid
181
- fill data remains, an exception is thrown:</p>
182
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">5</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: &lt;Buffer 61 61 61 61 61&gt;</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;aazz&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;hex&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: &lt;Buffer aa aa aa aa aa&gt;</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-2">&#39;zz&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;hex&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws an exception.</span>
183
- </code><button>Copy</button></pre>
184
- </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>
185
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
186
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
187
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
188
- </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>
189
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.0</p>
190
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.fill</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2065</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>
191
- </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-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </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
192
- the predicate function one time for each element in the array.</p>
193
- </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 ts-flagOptional">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.
194
- If thisArg is omitted, undefined is used as the this value.</p>
195
- </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:2216</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
196
- otherwise.</p>
197
- </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-kind-parameter">index</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </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
198
- order, until it finds one where predicate returns true. If such an element is found, find
199
- immediately returns that element value. Otherwise, find returns undefined.</p>
200
- </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 ts-flagOptional">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
201
- predicate. If it is not provided, undefined is used instead.</p>
202
- </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:2227</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
203
- otherwise.</p>
204
- </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-kind-parameter">index</span>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </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
205
- order, until it finds one where predicate returns true. If such an element is found,
206
- findIndex immediately returns that element index. Otherwise, findIndex returns -1.</p>
207
- </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 ts-flagOptional">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
208
- predicate. If it is not provided, undefined is used instead.</p>
209
- </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:2238</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>
210
- </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-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </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
211
- callbackfn function one time for each element in the array.</p>
212
- </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 ts-flagOptional">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.
213
- If thisArg is omitted, undefined is used as the this value.</p>
214
- </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:2247</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>
215
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;this is a buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-2">&#39;this&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-2">&#39;is&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;a buffer&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-9">97</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: true (97 is the decimal ASCII value for &#39;a&#39;)</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;a buffer example&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: false</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;a buffer example&#39;</span><span class="hl-1">).</span><span class="hl-0">slice</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: true</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-2">&#39;this&#39;</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: false</span>
216
- </code><button>Copy</button></pre>
217
- </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>
218
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
219
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
220
- </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>
221
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v5.3.0</p>
222
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.includes</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2257</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>
223
- <ul>
224
- <li>a string, <code>value</code> is interpreted according to the character encoding in <code>encoding</code>.</li>
225
- <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.
226
- To compare a partial <code>Buffer</code>, use <code>buf.subarray</code>.</li>
227
- <li>a number, <code>value</code> will be interpreted as an unsigned 8-bit integer
228
- value between <code>0</code> and <code>255</code>.</li>
229
- </ul>
230
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;this is a buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;this&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;is&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 2</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;a buffer&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: 8</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-9">97</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 8 (97 is the decimal ASCII value for &#39;a&#39;)</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;a buffer example&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;a buffer example&#39;</span><span class="hl-1">).</span><span class="hl-0">slice</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: 8</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">utf16Buffer</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u039a\u0391\u03a3\u03a3\u0395</span><span class="hl-2">&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">utf16Buffer</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u03a3</span><span class="hl-2">&#39;</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 4</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">utf16Buffer</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u03a3</span><span class="hl-2">&#39;</span><span class="hl-1">, -</span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 6</span>
231
- </code><button>Copy</button></pre>
232
- <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,
233
- an integer between 0 and 255.</p>
234
- <p>If <code>byteOffset</code> is not a number, it will be coerced to a number. If the result
235
- of coercion is <code>NaN</code> or <code>0</code>, then the entire buffer will be searched. This
236
- 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>
237
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">b</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;abcdef&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Passing a value that&#39;s a number, but not a valid byte.</span><br/><span class="hl-5">// Prints: 2, equivalent to searching for 99 or &#39;c&#39;.</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-9">99.9</span><span class="hl-1">));</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-9">256</span><span class="hl-1"> + </span><span class="hl-9">99</span><span class="hl-1">));</span><br/><br/><span class="hl-5">// Passing a byteOffset that coerces to NaN or 0.</span><br/><span class="hl-5">// Prints: 1, searching the whole buffer.</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, </span><span class="hl-3">undefined</span><span class="hl-1">));</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, {}));</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, </span><span class="hl-3">null</span><span class="hl-1">));</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">indexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, []));</span>
238
- </code><button>Copy</button></pre>
239
- <p>If <code>value</code> is an empty string or empty <code>Buffer</code> and <code>byteOffset</code> is less
240
- 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>
241
- </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>
242
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
243
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
244
- </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>
245
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v1.5.0</p>
246
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.indexOf</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2134</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>
247
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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
248
- resulting String. If omitted, the array elements are separated with a comma.</p>
249
- </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:2262</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member 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-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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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>Creates and returns an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterator</a> of <code>buf</code> keys (indices).</p>
250
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">key</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">keys</span><span class="hl-1">()) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">key</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// 0</span><br/><span class="hl-5">// 1</span><br/><span class="hl-5">// 2</span><br/><span class="hl-5">// 3</span><br/><span class="hl-5">// 4</span><br/><span class="hl-5">// 5</span>
251
- </code><button>Copy</button></pre>
252
- </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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v1.1.0</p>
253
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.keys</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2279</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
254
- rather than the first occurrence.</p>
255
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;this buffer is a buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;this&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 0</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 17</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: 17</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-9">97</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 15 (97 is the decimal ASCII value for &#39;a&#39;)</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;yolo&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">utf16Buffer</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u039a\u0391\u03a3\u03a3\u0395</span><span class="hl-2">&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">utf16Buffer</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u03a3</span><span class="hl-2">&#39;</span><span class="hl-1">, </span><span class="hl-3">undefined</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 6</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">utf16Buffer</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u03a3</span><span class="hl-2">&#39;</span><span class="hl-1">, -</span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 4</span>
256
- </code><button>Copy</button></pre>
257
- <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,
258
- an integer between 0 and 255.</p>
259
- <p>If <code>byteOffset</code> is not a number, it will be coerced to a number. Any arguments
260
- that coerce to <code>NaN</code>, like <code>{}</code> or <code>undefined</code>, will search the whole buffer.
261
- 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>
262
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">b</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;abcdef&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Passing a value that&#39;s a number, but not a valid byte.</span><br/><span class="hl-5">// Prints: 2, equivalent to searching for 99 or &#39;c&#39;.</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-9">99.9</span><span class="hl-1">));</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-9">256</span><span class="hl-1"> + </span><span class="hl-9">99</span><span class="hl-1">));</span><br/><br/><span class="hl-5">// Passing a byteOffset that coerces to NaN.</span><br/><span class="hl-5">// Prints: 1, searching the whole buffer.</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, </span><span class="hl-3">undefined</span><span class="hl-1">));</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, {}));</span><br/><br/><span class="hl-5">// Passing a byteOffset that coerces to 0.</span><br/><span class="hl-5">// Prints: -1, equivalent to passing 0.</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, </span><span class="hl-3">null</span><span class="hl-1">));</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">b</span><span class="hl-1">.</span><span class="hl-0">lastIndexOf</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">, []));</span>
263
- </code><button>Copy</button></pre>
264
- <p>If <code>value</code> is an empty string or empty <code>Buffer</code>, <code>byteOffset</code> will be returned.</p>
265
- </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>
266
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
267
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
268
- </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>
269
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.0.0</p>
270
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.lastIndexOf</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2202</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
271
- contains the results.</p>
272
- </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-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>A function that accepts up to three arguments. The map method calls the
273
- callbackfn function one time for each element in the array.</p>
274
- </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 ts-flagOptional">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.
275
- If thisArg is omitted, undefined is used as the this value.</p>
276
- </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:2285</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>
277
- <p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed
278
- values.</p>
279
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
280
- </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>Since</h4><p>v12.0.0, v10.20.0</p>
281
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1207</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>
282
- <p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed
283
- values.</p>
284
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
285
- </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>Since</h4><p>v12.0.0, v10.20.0</p>
286
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1216</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>
287
- <p>This function is also available under the <code>readBigUint64BE</code> alias.</p>
288
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readBigUInt64BE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 4294967295n</span>
289
- </code><button>Copy</button></pre>
290
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
291
- </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>Since</h4><p>v12.0.0, v10.20.0</p>
292
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1171</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>
293
- <p>This function is also available under the <code>readBigUint64LE</code> alias.</p>
294
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0x00</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">, </span><span class="hl-9">0xff</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readBigUInt64LE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 18446744069414584320n</span>
295
- </code><button>Copy</button></pre>
296
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
297
- </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>Since</h4><p>v12.0.0, v10.20.0</p>
298
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1193</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 ts-flagOptional">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>Alias</h4><p>Buffer.readBigUInt64BE</p>
299
- <h4>Since</h4><p>v14.10.0, v12.19.0</p>
300
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1176</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 ts-flagOptional">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>Alias</h4><p>Buffer.readBigUInt64LE</p>
301
- <h4>Since</h4><p>v14.10.0, v12.19.0</p>
302
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1198</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>
303
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">7</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readDoubleBE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 8.20788039913184e-304</span>
304
- </code><button>Copy</button></pre>
305
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
306
- </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>Since</h4><p>v0.11.15</p>
307
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1583</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>
308
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">, </span><span class="hl-9">7</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readDoubleLE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5.447603722011605e-270</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readDoubleLE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
309
- </code><button>Copy</button></pre>
310
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
311
- </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>Since</h4><p>v0.11.15</p>
312
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1568</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>
313
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readFloatBE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 2.387939260590663e-38</span>
314
- </code><button>Copy</button></pre>
315
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
316
- </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>Since</h4><p>v0.11.15</p>
317
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1551</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>
318
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readFloatLE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1.539989614439558e-36</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readFloatLE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
319
- </code><button>Copy</button></pre>
320
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
321
- </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>Since</h4><p>v0.11.15</p>
322
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1536</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>
323
- <p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
324
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt16BE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5</span>
325
- </code><button>Copy</button></pre>
326
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
327
- </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>Since</h4><p>v0.5.5</p>
328
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1483</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>
329
- <p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
330
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt16LE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1280</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt16LE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
331
- </code><button>Copy</button></pre>
332
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
333
- </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>Since</h4><p>v0.5.5</p>
334
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1466</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>
335
- <p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
336
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt32BE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5</span>
337
- </code><button>Copy</button></pre>
338
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
339
- </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>Since</h4><p>v0.5.5</p>
340
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1519</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>
341
- <p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
342
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt32LE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 83886080</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt32LE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
343
- </code><button>Copy</button></pre>
344
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
345
- </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>Since</h4><p>v0.5.5</p>
346
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1502</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>
347
- <p>Integers read from a <code>Buffer</code> are interpreted as two&#39;s complement signed values.</p>
348
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([-</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt8</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt8</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readInt8</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
349
- </code><button>Copy</button></pre>
350
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 1</code>.</p>
351
- </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>Since</h4><p>v0.5.0</p>
352
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1447</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&#39;s complement signed value
353
- supporting up to 48 bits of accuracy.</p>
354
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntBE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1234567890ab</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntBE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntBE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
355
- </code><button>Copy</button></pre>
356
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
357
- </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 &lt; byteLength &lt;= 6</code>.</p>
358
- </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>Since</h4><p>v0.11.15</p>
359
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1304</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&#39;s complement signed value
360
- supporting up to 48 bits of accuracy.</p>
361
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readIntLE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: -546f87a9cbee</span>
362
- </code><button>Copy</button></pre>
363
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
364
- </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 &lt; byteLength &lt;= 6</code>.</p>
365
- </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>Since</h4><p>v0.11.15</p>
366
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1283</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>
367
- <p>This function is also available under the <code>readUint16BE</code> alias.</p>
368
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16BE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1234</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16BE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 3456</span>
369
- </code><button>Copy</button></pre>
370
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
371
- </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>Since</h4><p>v0.5.5</p>
372
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1375</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>
373
- <p>This function is also available under the <code>readUint16LE</code> alias.</p>
374
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16LE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 3412</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16LE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 5634</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt16LE</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
375
- </code><button>Copy</button></pre>
376
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
377
- </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>Since</h4><p>v0.5.5</p>
378
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1351</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>
379
- <p>This function is also available under the <code>readUint32BE</code> alias.</p>
380
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt32BE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 12345678</span>
381
- </code><button>Copy</button></pre>
382
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
383
- </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>Since</h4><p>v0.5.5</p>
384
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1421</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>
385
- <p>This function is also available under the <code>readUint32LE</code> alias.</p>
386
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt32LE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 78563412</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt32LE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
387
- </code><button>Copy</button></pre>
388
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
389
- </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>Since</h4><p>v0.5.5</p>
390
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1399</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>
391
- <p>This function is also available under the <code>readUint8</code> alias.</p>
392
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">1</span><span class="hl-1">, -</span><span class="hl-9">2</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt8</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt8</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 254</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUInt8</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
393
- </code><button>Copy</button></pre>
394
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 1</code>.</p>
395
- </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>Since</h4><p>v0.5.0</p>
396
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1325</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
397
- up to 48 bits of accuracy.</p>
398
- <p>This function is also available under the <code>readUintBE</code> alias.</p>
399
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUIntBE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 1234567890ab</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUIntBE</span><span class="hl-1">(</span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Throws ERR_OUT_OF_RANGE.</span>
400
- </code><button>Copy</button></pre>
401
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
402
- </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 &lt; byteLength &lt;= 6</code>.</p>
403
- </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>Since</h4><p>v0.11.15</p>
404
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1261</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
405
- up to 48 bits of accuracy.</p>
406
- <p>This function is also available under the <code>readUintLE</code> alias.</p>
407
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x12</span><span class="hl-1">, </span><span class="hl-9">0x34</span><span class="hl-1">, </span><span class="hl-9">0x56</span><span class="hl-1">, </span><span class="hl-9">0x78</span><span class="hl-1">, </span><span class="hl-9">0x90</span><span class="hl-1">, </span><span class="hl-9">0xab</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">readUIntLE</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-9">16</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: ab9078563412</span>
408
- </code><button>Copy</button></pre>
409
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
410
- </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 &lt; byteLength &lt;= 6</code>.</p>
411
- </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>Since</h4><p>v0.11.15</p>
412
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1235</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 ts-flagOptional">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>Alias</h4><p>Buffer.readUInt16BE</p>
413
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
414
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1380</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 ts-flagOptional">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>Alias</h4><p>Buffer.readUInt16LE</p>
415
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
416
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1356</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 ts-flagOptional">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>Alias</h4><p>Buffer.readUInt32BE</p>
417
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
418
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1426</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 ts-flagOptional">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>Alias</h4><p>Buffer.readUInt32LE</p>
419
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
420
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1404</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 ts-flagOptional">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>Alias</h4><p>Buffer.readUInt8</p>
421
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
422
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1330</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>Alias</h4><p>Buffer.readUIntBE</p>
423
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
424
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1266</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>Alias</h4><p>Buffer.readUIntLE</p>
425
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
426
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1240</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
427
- the callback function is the accumulated result, and is provided as an argument in the next
428
- call to the callback function.</p>
429
- </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-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"> =&gt; </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
430
- callbackfn function one time for each element in the array.</p>
431
- </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:2297</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-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"> =&gt; </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:2298</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">&lt;</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">&gt;</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
432
- the callback function is the accumulated result, and is provided as an argument in the next
433
- call to the callback function.</p>
434
- </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-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"> =&gt; </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
435
- callbackfn function one time for each element in the array.</p>
436
- </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
437
- the accumulation. The first call to the callbackfn function provides this value as an argument
438
- instead of an array value.</p>
439
- </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:2310</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.
440
- The return value of the callback function is the accumulated result, and is provided as an
441
- argument in the next call to the callback function.</p>
442
- </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-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"> =&gt; </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
443
- the callbackfn function one time for each element in the array.</p>
444
- </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:2322</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-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"> =&gt; </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:2323</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">&lt;</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">&gt;</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.
445
- The return value of the callback function is the accumulated result, and is provided as an
446
- argument in the next call to the callback function.</p>
447
- </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-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"> =&gt; </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
448
- the callbackfn function one time for each element in the array.</p>
449
- </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
450
- the accumulation. The first call to the callbackfn function provides this value as an argument
451
- instead of an array value.</p>
452
- </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:2335</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"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Overrides Uint8Array.reverse</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1584</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>
453
- </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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>A typed or untyped array of values to set.</p>
454
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
455
- </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:2347</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
456
- offset and cropped by the <code>start</code> and <code>end</code> indices.</p>
457
- <p>This method is not compatible with the <code>Uint8Array.prototype.slice()</code>,
458
- which is a superclass of <code>Buffer</code>. To copy the slice, use<code>Uint8Array.prototype.slice()</code>.</p>
459
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">copiedBuf</span><span class="hl-1"> = </span><span class="hl-8">Uint8Array</span><span class="hl-1">.</span><span class="hl-7">prototype</span><span class="hl-1">.</span><span class="hl-7">slice</span><span class="hl-1">.</span><span class="hl-0">call</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-7">copiedBuf</span><span class="hl-1">[</span><span class="hl-9">0</span><span class="hl-1">]++;</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">copiedBuf</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: cuffer</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: buffer</span><br/><br/><span class="hl-5">// With buf.slice(), the original buffer is modified.</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">notReallyCopiedBuf</span><span class="hl-1"> = </span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">slice</span><span class="hl-1">();</span><br/><span class="hl-7">notReallyCopiedBuf</span><span class="hl-1">[</span><span class="hl-9">0</span><span class="hl-1">]++;</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">notReallyCopiedBuf</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: cuffer</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Also prints: cuffer (!)</span>
460
- </code><button>Copy</button></pre>
461
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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>
462
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
463
- </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>Since</h4><p>v0.3.0</p>
464
- <h4>Deprecated</h4><p>Use <code>subarray</code> instead.</p>
465
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.slice</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:902</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>
466
- </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-kind-parameter">index</span>, <span class="tsd-kind-parameter">array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </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
467
- the predicate function for each element in the array until the predicate returns a value
468
- which is coercible to the Boolean value true, or until the end of the array.</p>
469
- </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 ts-flagOptional">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.
470
- If thisArg is omitted, undefined is used as the this value.</p>
471
- </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:2364</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>
472
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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-kind-parameter">b</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>Function used to determine the order of the elements. It is expected to return
473
- a negative value if first argument is less than second argument, zero if they&#39;re equal and a positive
474
- value otherwise. If omitted, the elements are sorted in ascending order.</p>
475
- <pre><code class="language-ts"><span class="hl-1">[</span><span class="hl-9">11</span><span class="hl-1">,</span><span class="hl-9">2</span><span class="hl-1">,</span><span class="hl-9">22</span><span class="hl-1">,</span><span class="hl-9">1</span><span class="hl-1">].</span><span class="hl-0">sort</span><span class="hl-1">((</span><span class="hl-7">a</span><span class="hl-1">, </span><span class="hl-7">b</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">a</span><span class="hl-1"> - </span><span class="hl-7">b</span><span class="hl-1">)</span>
476
- </code><button>Copy</button></pre>
477
- </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:2375</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
478
- offset and cropped by the <code>start</code> and <code>end</code> indices.</p>
479
- <p>Specifying <code>end</code> greater than <code>buf.length</code> will return the same result as
480
- that of <code>end</code> equal to <code>buf.length</code>.</p>
481
- <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>
482
- <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>
483
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte</span><br/><span class="hl-5">// from the original `Buffer`.</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">26</span><span class="hl-1">);</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">i</span><span class="hl-1"> = </span><span class="hl-9">0</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1"> &lt; </span><span class="hl-9">26</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-1"> </span><span class="hl-7">buf1</span><span class="hl-1">[</span><span class="hl-7">i</span><span class="hl-1">] = </span><span class="hl-7">i</span><span class="hl-1"> + </span><span class="hl-9">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">subarray</span><span class="hl-1">(</span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-2">&#39;ascii&#39;</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-7">length</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: abc</span><br/><br/><span class="hl-7">buf1</span><span class="hl-1">[</span><span class="hl-9">0</span><span class="hl-1">] = </span><span class="hl-9">33</span><span class="hl-1">;</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-2">&#39;ascii&#39;</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-7">length</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: !bc</span>
484
- </code><button>Copy</button></pre>
485
- <p>Specifying negative indexes causes the slice to be generated relative to the
486
- end of <code>buf</code> rather than the beginning.</p>
487
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">subarray</span><span class="hl-1">(-</span><span class="hl-9">6</span><span class="hl-1">, -</span><span class="hl-9">1</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: buffe</span><br/><span class="hl-5">// (Equivalent to buf.subarray(0, 5).)</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">subarray</span><span class="hl-1">(-</span><span class="hl-9">6</span><span class="hl-1">, -</span><span class="hl-9">2</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: buff</span><br/><span class="hl-5">// (Equivalent to buf.subarray(0, 4).)</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">subarray</span><span class="hl-1">(-</span><span class="hl-9">5</span><span class="hl-1">, -</span><span class="hl-9">2</span><span class="hl-1">).</span><span class="hl-0">toString</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: uff</span><br/><span class="hl-5">// (Equivalent to buf.subarray(1, 4).)</span>
488
- </code><button>Copy</button></pre>
489
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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>
490
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
491
- </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>Since</h4><p>v3.0.0</p>
492
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.subarray</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:962</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
493
- 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>
494
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x1</span><span class="hl-1">, </span><span class="hl-9">0x2</span><span class="hl-1">, </span><span class="hl-9">0x3</span><span class="hl-1">, </span><span class="hl-9">0x4</span><span class="hl-1">, </span><span class="hl-9">0x5</span><span class="hl-1">, </span><span class="hl-9">0x6</span><span class="hl-1">, </span><span class="hl-9">0x7</span><span class="hl-1">, </span><span class="hl-9">0x8</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span><br/><br/><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">swap16</span><span class="hl-1">();</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 02 01 04 03 06 05 08 07&gt;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x1</span><span class="hl-1">, </span><span class="hl-9">0x2</span><span class="hl-1">, </span><span class="hl-9">0x3</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">swap16</span><span class="hl-1">();</span><br/><span class="hl-5">// Throws ERR_INVALID_BUFFER_SIZE.</span>
495
- </code><button>Copy</button></pre>
496
- <p>One convenient use of <code>buf.swap16()</code> is to perform a fast in-place conversion
497
- between UTF-16 little-endian and UTF-16 big-endian:</p>
498
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;This is little-endian UTF-16&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;utf16le&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">swap16</span><span class="hl-1">(); </span><span class="hl-5">// Convert to big-endian UTF-16 text.</span>
499
- </code><button>Copy</button></pre>
500
- </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>
501
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v5.10.0</p>
502
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1620</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
503
- 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>
504
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x1</span><span class="hl-1">, </span><span class="hl-9">0x2</span><span class="hl-1">, </span><span class="hl-9">0x3</span><span class="hl-1">, </span><span class="hl-9">0x4</span><span class="hl-1">, </span><span class="hl-9">0x5</span><span class="hl-1">, </span><span class="hl-9">0x6</span><span class="hl-1">, </span><span class="hl-9">0x7</span><span class="hl-1">, </span><span class="hl-9">0x8</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span><br/><br/><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">swap32</span><span class="hl-1">();</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 04 03 02 01 08 07 06 05&gt;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x1</span><span class="hl-1">, </span><span class="hl-9">0x2</span><span class="hl-1">, </span><span class="hl-9">0x3</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">swap32</span><span class="hl-1">();</span><br/><span class="hl-5">// Throws ERR_INVALID_BUFFER_SIZE.</span>
505
- </code><button>Copy</button></pre>
506
- </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>
507
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v5.10.0</p>
508
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1646</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>.
509
- Throws <code>ERR_INVALID_BUFFER_SIZE</code> if <code>buf.length</code> is not a multiple of 8.</p>
510
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x1</span><span class="hl-1">, </span><span class="hl-9">0x2</span><span class="hl-1">, </span><span class="hl-9">0x3</span><span class="hl-1">, </span><span class="hl-9">0x4</span><span class="hl-1">, </span><span class="hl-9">0x5</span><span class="hl-1">, </span><span class="hl-9">0x6</span><span class="hl-1">, </span><span class="hl-9">0x7</span><span class="hl-1">, </span><span class="hl-9">0x8</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span><br/><br/><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">swap64</span><span class="hl-1">();</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 08 07 06 05 04 03 02 01&gt;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x1</span><span class="hl-1">, </span><span class="hl-9">0x2</span><span class="hl-1">, </span><span class="hl-9">0x3</span><span class="hl-1">]);</span><br/><br/><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">swap64</span><span class="hl-1">();</span><br/><span class="hl-5">// Throws ERR_INVALID_BUFFER_SIZE.</span>
511
- </code><button>Copy</button></pre>
512
- </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>
513
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.3.0</p>
514
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1672</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">&quot;Buffer&quot;</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
515
- this function when stringifying a <code>Buffer</code> instance.</p>
516
- <p><code>Buffer.from()</code> accepts objects in the format returned from this method.
517
- In particular, <code>Buffer.from(buf.toJSON())</code> works like <code>Buffer.from(buf)</code>.</p>
518
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-9">0x1</span><span class="hl-1">, </span><span class="hl-9">0x2</span><span class="hl-1">, </span><span class="hl-9">0x3</span><span class="hl-1">, </span><span class="hl-9">0x4</span><span class="hl-1">, </span><span class="hl-9">0x5</span><span class="hl-1">]);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">json</span><span class="hl-1"> = </span><span class="hl-4">JSON</span><span class="hl-1">.</span><span class="hl-0">stringify</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">json</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: {&quot;type&quot;:&quot;Buffer&quot;,&quot;data&quot;:[1,2,3,4,5]}</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">copy</span><span class="hl-1"> = </span><span class="hl-4">JSON</span><span class="hl-1">.</span><span class="hl-0">parse</span><span class="hl-1">(</span><span class="hl-7">json</span><span class="hl-1">, (</span><span class="hl-7">key</span><span class="hl-1">, </span><span class="hl-7">value</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">return</span><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1"> &amp;#</span><span class="hl-7">x26</span><span class="hl-1">;&amp;#</span><span class="hl-7">x26</span><span class="hl-1">; </span><span class="hl-7">value</span><span class="hl-1">.</span><span class="hl-7">type</span><span class="hl-1"> === </span><span class="hl-2">&#39;Buffer&#39;</span><span class="hl-1"> ?</span><br/><span class="hl-1"> </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-7">value</span><span class="hl-1">) :</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">;</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">copy</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05&gt;</span>
519
- </code><button>Copy</button></pre>
520
- </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">&quot;Buffer&quot;</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">&quot;Buffer&quot;</span></h5></li></ul><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.2</p>
521
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:731</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>
522
- </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:2388</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>
523
- <p>If <code>encoding</code> is <code>&#39;utf8&#39;</code> and a byte sequence in the input is not valid UTF-8,
524
- then each invalid byte is replaced with the replacement character <code>U+FFFD</code>.</p>
525
- <p>The maximum length of a string instance (in UTF-16 code units) is available
526
- as constants.MAX_STRING_LENGTH.</p>
527
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf1</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">26</span><span class="hl-1">);</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">i</span><span class="hl-1"> = </span><span class="hl-9">0</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1"> &lt; </span><span class="hl-9">26</span><span class="hl-1">; </span><span class="hl-7">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-5">// 97 is the decimal ASCII value for &#39;a&#39;.</span><br/><span class="hl-1"> </span><span class="hl-7">buf1</span><span class="hl-1">[</span><span class="hl-7">i</span><span class="hl-1">] = </span><span class="hl-7">i</span><span class="hl-1"> + </span><span class="hl-9">97</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: abcdefghijklmnopqrstuvwxyz</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf1</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: abcde</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf2</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;tést&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-2">&#39;hex&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 74c3a97374</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: té</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf2</span><span class="hl-1">.</span><span class="hl-0">toString</span><span class="hl-1">(</span><span class="hl-3">undefined</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: té</span>
528
- </code><button>Copy</button></pre>
529
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">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>
530
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
531
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
532
- </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>Since</h4><p>v0.1.90</p>
533
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.toString</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:703</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>
534
- </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:2396</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member 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-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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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>Creates and returns an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterator</a> for <code>buf</code> values (bytes). This function is
535
- called automatically when a <code>Buffer</code> is used in a <code>for..of</code> statement.</p>
536
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;buffer&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">value</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">values</span><span class="hl-1">()) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">value</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// 98</span><br/><span class="hl-5">// 117</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 101</span><br/><span class="hl-5">// 114</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">value</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-7">buf</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">value</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// 98</span><br/><span class="hl-5">// 117</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 102</span><br/><span class="hl-5">// 101</span><br/><span class="hl-5">// 114</span>
537
- </code><button>Copy</button></pre>
538
- </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">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v1.1.0</p>
539
- </div><aside class="tsd-sources"><p>Overrides Uint8Array.values</p><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2313</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
540
- not contain enough space to fit the entire string, only part of <code>string</code> will be
541
- written. However, partially encoded characters will not be written.</p>
542
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-9">256</span><span class="hl-1">);</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">len</span><span class="hl-1"> = </span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\u00bd</span><span class="hl-2"> + </span><span class="hl-11">\u00bc</span><span class="hl-2"> = </span><span class="hl-11">\u00be</span><span class="hl-2">&#39;</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`</span><span class="hl-3">${</span><span class="hl-7">len</span><span class="hl-3">}</span><span class="hl-2"> bytes: </span><span class="hl-3">${</span><span class="hl-7">buf</span><span class="hl-10">.</span><span class="hl-0">toString</span><span class="hl-10">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-10">, </span><span class="hl-9">0</span><span class="hl-10">, </span><span class="hl-7">len</span><span class="hl-10">)</span><span class="hl-3">}</span><span class="hl-2">`</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: 12 bytes: ½ + ¼ = ¾</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buffer</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-9">10</span><span class="hl-1">);</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">length</span><span class="hl-1"> = </span><span class="hl-7">buffer</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-2">&#39;abcd&#39;</span><span class="hl-1">, </span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`</span><span class="hl-3">${</span><span class="hl-7">length</span><span class="hl-3">}</span><span class="hl-2"> bytes: </span><span class="hl-3">${</span><span class="hl-7">buffer</span><span class="hl-10">.</span><span class="hl-0">toString</span><span class="hl-10">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-10">, </span><span class="hl-9">8</span><span class="hl-10">, </span><span class="hl-9">10</span><span class="hl-10">)</span><span class="hl-3">}</span><span class="hl-2">`</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: 2 bytes : ab</span>
543
- </code><button>Copy</button></pre>
544
- </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>
545
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
546
- </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>
547
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
548
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:662</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 ts-flagOptional">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:663</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 ts-flagOptional">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:664</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>
549
- <p><code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
550
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeBigInt64BE</span><span class="hl-1">(</span><span class="hl-9">0x0102030405060708</span><span class="hl-3">n</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04 05 06 07 08&gt;</span>
551
- </code><button>Copy</button></pre>
552
- </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>
553
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
554
- </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>
555
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.0.0, v10.20.0</p>
556
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:983</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>
557
- <p><code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
558
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeBigInt64LE</span><span class="hl-1">(</span><span class="hl-9">0x0102030405060708</span><span class="hl-3">n</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 08 07 06 05 04 03 02 01&gt;</span>
559
- </code><button>Copy</button></pre>
560
- </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>
561
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
562
- </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>
563
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.0.0, v10.20.0</p>
564
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1004</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>
565
- <p>This function is also available under the <code>writeBigUint64BE</code> alias.</p>
566
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeBigUInt64BE</span><span class="hl-1">(</span><span class="hl-9">0xdecafafecacefade</span><span class="hl-3">n</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer de ca fa fe ca ce fa de&gt;</span>
567
- </code><button>Copy</button></pre>
568
- </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>
569
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
570
- </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>
571
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.0.0, v10.20.0</p>
572
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1025</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>
573
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeBigUInt64LE</span><span class="hl-1">(</span><span class="hl-9">0xdecafafecacefade</span><span class="hl-3">n</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer de fa ce ca fe fa ca de&gt;</span>
574
- </code><button>Copy</button></pre>
575
- <p>This function is also available under the <code>writeBigUint64LE</code> alias.</p>
576
- </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>
577
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
578
- </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>
579
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.0.0, v10.20.0</p>
580
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1051</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 ts-flagOptional">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>Alias</h4><p>Buffer.writeBigUInt64BE</p>
581
- <h4>Since</h4><p>v14.10.0, v12.19.0</p>
582
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1030</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 ts-flagOptional">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>Alias</h4><p>Buffer.writeBigUInt64LE</p>
583
- <h4>Since</h4><p>v14.10.0, v12.19.0</p>
584
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1056</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
585
- other than a JavaScript number.</p>
586
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeDoubleBE</span><span class="hl-1">(</span><span class="hl-9">123.456</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 40 5e dd 2f 1a 9f be 77&gt;</span>
587
- </code><button>Copy</button></pre>
588
- </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>
589
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
590
- </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>
591
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
592
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:2005</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
593
- other than a JavaScript number.</p>
594
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">8</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeDoubleLE</span><span class="hl-1">(</span><span class="hl-9">123.456</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 77 be 9f 1a 2f dd 5e 40&gt;</span>
595
- </code><button>Copy</button></pre>
596
- </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>
597
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 8</code>.</p>
598
- </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>
599
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
600
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1985</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
601
- undefined when <code>value</code> is anything other than a JavaScript number.</p>
602
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeFloatBE</span><span class="hl-1">(</span><span class="hl-9">0xcafebabe</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 4f 4a fe bb&gt;</span>
603
- </code><button>Copy</button></pre>
604
- </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>
605
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
606
- </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>
607
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
608
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1965</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
609
- undefined when <code>value</code> is anything other than a JavaScript number.</p>
610
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeFloatLE</span><span class="hl-1">(</span><span class="hl-9">0xcafebabe</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer bb fe 4a 4f&gt;</span>
611
- </code><button>Copy</button></pre>
612
- </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>
613
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
614
- </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>
615
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
616
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1945</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
617
- anything other than a signed 16-bit integer.</p>
618
- <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
619
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt16BE</span><span class="hl-1">(</span><span class="hl-9">0x0102</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02&gt;</span>
620
- </code><button>Copy</button></pre>
621
- </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>
622
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
623
- </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>
624
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
625
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1881</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
626
- anything other than a signed 16-bit integer.</p>
627
- <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
628
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt16LE</span><span class="hl-1">(</span><span class="hl-9">0x0304</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 04 03&gt;</span>
629
- </code><button>Copy</button></pre>
630
- </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>
631
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
632
- </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>
633
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
634
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1859</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
635
- anything other than a signed 32-bit integer.</p>
636
- <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
637
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt32BE</span><span class="hl-1">(</span><span class="hl-9">0x01020304</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 01 02 03 04&gt;</span>
638
- </code><button>Copy</button></pre>
639
- </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>
640
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
641
- </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>
642
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
643
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1925</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
644
- anything other than a signed 32-bit integer.</p>
645
- <p>The <code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
646
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt32LE</span><span class="hl-1">(</span><span class="hl-9">0x05060708</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 08 07 06 05&gt;</span>
647
- </code><button>Copy</button></pre>
648
- </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>
649
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
650
- </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>
651
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
652
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1903</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
653
- signed 8-bit integer. Behavior is undefined when <code>value</code> is anything other than
654
- a signed 8-bit integer.</p>
655
- <p><code>value</code> is interpreted and written as a two&#39;s complement signed integer.</p>
656
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt8</span><span class="hl-1">(</span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeInt8</span><span class="hl-1">(-</span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">1</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 02 fe&gt;</span>
657
- </code><button>Copy</button></pre>
658
- </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>
659
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 1</code>.</p>
660
- </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>
661
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.0</p>
662
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1837</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
663
- signed integer.</p>
664
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeIntBE</span><span class="hl-1">(</span><span class="hl-9">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 12 34 56 78 90 ab&gt;</span>
665
- </code><button>Copy</button></pre>
666
- </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>
667
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
668
- </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 &lt; byteLength &lt;= 6</code>.</p>
669
- </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>
670
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
671
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1154</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
672
- when <code>value</code> is anything other than a signed integer.</p>
673
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeIntLE</span><span class="hl-1">(</span><span class="hl-9">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ab 90 78 56 34 12&gt;</span>
674
- </code><button>Copy</button></pre>
675
- </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>
676
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
677
- </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 &lt; byteLength &lt;= 6</code>.</p>
678
- </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>
679
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.15</p>
680
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1133</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
681
- unsigned 16-bit integer.</p>
682
- <p>This function is also available under the <code>writeUint16BE</code> alias.</p>
683
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16BE</span><span class="hl-1">(</span><span class="hl-9">0xdead</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16BE</span><span class="hl-1">(</span><span class="hl-9">0xbeef</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer de ad be ef&gt;</span>
684
- </code><button>Copy</button></pre>
685
- </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>
686
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
687
- </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>
688
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
689
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1754</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
690
- anything other than an unsigned 16-bit integer.</p>
691
- <p>This function is also available under the <code>writeUint16LE</code> alias.</p>
692
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16LE</span><span class="hl-1">(</span><span class="hl-9">0xdead</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt16LE</span><span class="hl-1">(</span><span class="hl-9">0xbeef</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ad de ef be&gt;</span>
693
- </code><button>Copy</button></pre>
694
- </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>
695
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 2</code>.</p>
696
- </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>
697
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
698
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1726</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
699
- unsigned 32-bit integer.</p>
700
- <p>This function is also available under the <code>writeUint32BE</code> alias.</p>
701
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt32BE</span><span class="hl-1">(</span><span class="hl-9">0xfeedface</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer fe ed fa ce&gt;</span>
702
- </code><button>Copy</button></pre>
703
- </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>
704
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
705
- </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>
706
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
707
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1808</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
708
- anything other than an unsigned 32-bit integer.</p>
709
- <p>This function is also available under the <code>writeUint32LE</code> alias.</p>
710
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt32LE</span><span class="hl-1">(</span><span class="hl-9">0xfeedface</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ce fa ed fe&gt;</span>
711
- </code><button>Copy</button></pre>
712
- </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>
713
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 4</code>.</p>
714
- </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>
715
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
716
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1781</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
717
- valid unsigned 8-bit integer. Behavior is undefined when <code>value</code> is anything
718
- other than an unsigned 8-bit integer.</p>
719
- <p>This function is also available under the <code>writeUint8</code> alias.</p>
720
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">4</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt8</span><span class="hl-1">(</span><span class="hl-9">0x3</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt8</span><span class="hl-1">(</span><span class="hl-9">0x4</span><span class="hl-1">, </span><span class="hl-9">1</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt8</span><span class="hl-1">(</span><span class="hl-9">0x23</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">);</span><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUInt8</span><span class="hl-1">(</span><span class="hl-9">0x42</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 03 04 23 42&gt;</span>
721
- </code><button>Copy</button></pre>
722
- </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>
723
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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 &lt;= offset &lt;= buf.length - 1</code>.</p>
724
- </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>
725
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.0</p>
726
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1698</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
727
- when <code>value</code> is anything other than an unsigned integer.</p>
728
- <p>This function is also available under the <code>writeUintBE</code> alias.</p>
729
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUIntBE</span><span class="hl-1">(</span><span class="hl-9">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer 12 34 56 78 90 ab&gt;</span>
730
- </code><button>Copy</button></pre>
731
- </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>
732
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
733
- </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 &lt; byteLength &lt;= 6</code>.</p>
734
- </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>
735
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
736
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1107</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
737
- when <code>value</code> is anything other than an unsigned integer.</p>
738
- <p>This function is also available under the <code>writeUintLE</code> alias.</p>
739
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">Buffer</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-0">writeUIntLE</span><span class="hl-1">(</span><span class="hl-9">0x1234567890ab</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">, </span><span class="hl-9">6</span><span class="hl-1">);</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints: &lt;Buffer ab 90 78 56 34 12&gt;</span>
740
- </code><button>Copy</button></pre>
741
- </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>
742
- </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 &lt;= offset &lt;= buf.length - byteLength</code>.</p>
743
- </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 &lt; byteLength &lt;= 6</code>.</p>
744
- </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>
745
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.5</p>
746
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1079</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 ts-flagOptional">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>Alias</h4><p>Buffer.writeUInt16BE</p>
747
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
748
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1759</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 ts-flagOptional">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>Alias</h4><p>Buffer.writeUInt16LE</p>
749
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
750
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1731</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 ts-flagOptional">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>Alias</h4><p>Buffer.writeUInt32BE</p>
751
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
752
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1813</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 ts-flagOptional">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>Alias</h4><p>Buffer.writeUInt32LE</p>
753
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
754
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1786</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 ts-flagOptional">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>Alias</h4><p>Buffer.writeUInt8</p>
755
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
756
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1703</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>Alias</h4><p>Buffer.writeUIntBE</p>
757
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
758
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1112</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>Alias</h4><p>Buffer.writeUIntLE</p>
759
- <h4>Since</h4><p>v14.9.0, v12.19.0</p>
760
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:1084</li></ul></aside></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-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"><h4 class="uppercase">Member Visibility</h4><form><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-private" name="private"/><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>Private</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></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><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-index-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"><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><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-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-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-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><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>@codebolt/codeboltjs</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>