Why not use a TypedArray and save the base64 encode/decode/encode/decode.