This function efficiently calculates the byte length of hex-like values.
For valid Hex strings, it uses a fast-path helper. For other types, it
converts to bytes first.
May throw if hexLike contains invalid byte values when passed to bytesFrom.
See
bytesLenUnsafe - Fast version for already-validated Hex strings
bytesFrom - Convert values to Bytes (Uint8Array)
Note
Prefer direct .length/.byteLength access on Uint8Array/ArrayBuffer when you already have bytes.
Use bytesLen() only when you need length without performing additional operations.
Return the number of bytes occupied by
hexLike.This function efficiently calculates the byte length of hex-like values. For valid Hex strings, it uses a fast-path helper. For other types, it converts to bytes first.