Numbers To Know medium
Roughly how much larger does binary data become when encoded as Base64?
- A 2x (+100%)
- B approximately 1.33x (+33%)
- C approximately 1.1x (+10%)
- D The data actually becomes slightly smaller
Answer: B. approximately 1.33x (+33%)
Base64 encoding works by taking every 3 bytes (24 bits) of raw binary data and splitting them into four 6-bit chunks. Each 6-bit chunk is then mapped to a safe ASCII character (A-Z, a-z, 0-9, etc.). Because 4 characters are now representing what was originally 3 bytes, the data size increases by exactly 33.3%. While this is less efficient than raw binary, it is essential for sending images or keys through protocols like SMTP (email) or JSON, which were only designed to handle text. If bandwidth is a concern, engineers often compress the data *after* encoding to reclaim some of this lost space.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is the maximum allowed downtime per year for a system targeting '99.9%' (Three Nines) availability?
- What is the typical size of a standard ASCII character (e.g., 'A')?
- What is the typical Round Trip Time (RTT) for a single network packet traveling between New York and London (Transatlantic)?
- Network bandwidth is usually denoted in **bits** per second (Gbps), while storage is in **Bytes** (GB). What is the conversion ratio?
- Storing a password using a secure algorithm like bcrypt (cost 10) or Argon2 typically consumes how much storage per user?
- How much power does a typical fully-loaded rack-mount server consume?