Fixed api typos
bufferToArrayBuffer should pass optional encoding