Fix a few syntax errors and make decode function return ArrayBuffer.
Fix a few syntax errors and make decode function return ArrayBuffer.

oftn/common,oftn/common,oftn/common,oftn/common,oftn/common,oftn/common