public static int readVarInt(DataInputStream in) throws IOException {
		int i = 0;
		int j = 0;
		while (true) {
			int k = in.readByte();
			i |= (k & 0x7F) << j++ * 7;
			if (j > 5) throw new IOException("VarInt too big");
			if ((k & 0x80) != 128) break;
		}
		return i;
	}