Which is faster, hex encoding or base64 encoding?
1 answer
The time it takes to code is not really an issue. Base64 is more complex, but encoding still won't be a big overhead. The real problem is the time it takes to transfer data over the network, which depends on the encoded size of the data.
-
Base64 expands the size of the data by one third compared to its binary form. So your 40MB file will be around 53MB.
-
Hex encoding will double the data size, so your 40MB file will be 80MB.
In short, Base64 wins.
+14
source to share