Skip to contentOpen History to see the last commit
base64.ts
4 lines199 Bytes
1export function estimateBase64ByteSize(base64: string): number { 2 const padding = base64.endsWith("==") ? 2 : base64.endsWith("=") ? 1 : 0; 3 return Math.floor((base64.length * 3) / 4) - padding;