Encode/decode base64 in blocks