MCPcopy Create free account
hub / github.com/microsoft/SandDance / byteLength

Function byteLength

docs/tests/v2/es6/js/sanddance.js:78163–78168  ·  view source on GitHub ↗
(b64)

Source from the content-addressed store, hash-verified

78161
78162// base64 is 4/3 + up to two characters of the original data
78163function byteLength (b64) {
78164 var lens = getLens(b64)
78165 var validLen = lens[0]
78166 var placeHoldersLen = lens[1]
78167 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
78168}
78169
78170function _byteLength (b64, validLen, placeHoldersLen) {
78171 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen

Callers 1

fromStringFunction · 0.70

Calls 3

getLensFunction · 0.70
utf8ToBytesFunction · 0.70
base64ToBytesFunction · 0.70

Tested by

no test coverage detected