update ext typecode testcase to ensure correct decoded typecode
update encoding/decoding of ext type codes to be explicit about signedness/endianness (and fix now-failing testcase)