Skip to content

SizeEstimate

SizeEstimate represents the estimated size range of a string, bytes, list, or map.

new SizeEstimate(Min, Max): SizeEstimate

bigint

bigint

SizeEstimate

readonly Max: bigint


readonly Min: bigint

add(other): SizeEstimate

add returns the sum of two size estimates with uint64 overflow protection.

SizeEstimate

SizeEstimate


asCost(): CostEstimate

asCost converts a size range into an equivalent cost range.

CostEstimate


multiply(other): SizeEstimate

multiply returns the product of two size estimates with uint64 overflow protection.

SizeEstimate

SizeEstimate


multiplyByCost(cost): CostEstimate

multiplyByCost returns the product of a size range and a cost range.

CostEstimate

CostEstimate


multiplyByCostFactor(costPerUnit): CostEstimate

multiplyByCostFactor converts the size range into a cost range using the provided factor.

number

CostEstimate


union(other): SizeEstimate

union returns the smallest estimate that covers both ranges.

SizeEstimate

SizeEstimate