private int readInt()
	{
		int ret = readByteAsInt();
		int tmp;

		if (ret < 128)
		{
			return ret;
		}
		else
		{
			ret = (ret & 0x7f) << 7;
			tmp = readByteAsInt();
			if (tmp < 128)
			{
				ret = ret | tmp;
			}
			else
			{
				ret = (ret | tmp & 0x7f) << 7;
				tmp = readByteAsInt();
				if (tmp < 128)
				{
					ret = ret | tmp;
				}
				else
				{
					ret = (ret | tmp & 0x7f) << 8;
					tmp = readByteAsInt();
					ret = ret | tmp;
				}
			}
		}

		// Sign extend
		int mask = 1 << 28;
		int r = -(ret & mask) | ret;
		return r;
	}