Code & Deploy
siGit Code
Git Hosting
Toggle menu
siGit Code
Git Hosting
Sign in
Sign in
@devries-cameron20
/
t3code-1
Fork
0
The best way to control Claude Code, Codex and more from any computer or phone
t3code-1
/
apps
/
mobile
/
src
/
lib
/
base64.ts
Code
Commits
Issues
Pulls
Cloud Agent
CICD
main
main
ts
4 lines
199 Bytes
Copy permalink
Copy
Raw
1
export
function
estimateBase64ByteSize
(
base64
:
string
):
number
{
2
const
padding
=
base64
.
endsWith
(
"
==
"
)
?
2
:
base64
.
endsWith
(
"
=
"
)
?
1
:
0
;
3
return
Math
.
floor
((
base64
.
length
*
3
)
/
4
)
-
padding
;
4
}