ethereumjs-monorepo

@ethereumjs/util


@ethereumjs/util / getBinaryTreeIndicesForCodeChunk

Function: getBinaryTreeIndicesForCodeChunk()

getBinaryTreeIndicesForCodeChunk(chunkId): object

Defined in: packages/util/src/binaryTree.ts:156

Calculates the position of the code chunks in the BinaryTree tree, determining both the tree index (the node in the tree) and the subindex (the position within the node).

Parameters

chunkId

number

The ID representing a specific chunk.

Returns

object

subIndex

subIndex: number

treeIndex

treeIndex: number