public static int readSignedVarInt(byte[] bytes) {
        int raw = readUnsignedVarInt(bytes);
        // This undoes the trick in writeSignedVarInt()
        int temp = (((raw << 31) >> 31) ^ raw) >> 1;
        // This extra step lets us deal with the largest signed values by treating