use readUint8 for browser compat