import io


def decode_int8(fh: io.BytesIO) -> int:
    """
    Read a single byte as an unsigned integer.

    This data type isn't given a special name like "ITF-8" or "int32" in the spec, and is only used twice in the
    file descriptor as a special case, and as a convenience to construct other data types, like ITF-8 and LTF-8.
    """
    return int.from_bytes(fh.read(1), byteorder='little', signed=False)