private long readLong_slow (boolean optimizePositive) {
		// The buffer is guaranteed to have at least 1 byte.
		position++;
		int b = niobuffer.get();
		long result = b & 0x7F;
		if ((b & 0x80) != 0) {
			require(1);
			position++;
			b = niobuffer.get();
			result |= (b & 0x7F) << 7;
			if ((b & 0x80) != 0) {
				require(1);
				position++;
				b = niobuffer.get();
				result |= (b & 0x7F) << 14;
				if ((b & 0x80) != 0) {
					require(1);
					position++;
					b = niobuffer.get();
					result |= (b & 0x7F) << 21;
					if ((b & 0x80) != 0) {
						require(1);
						position++;
						b = niobuffer.get();
						result |= (long)(b & 0x7F) << 28;
						if ((b & 0x80) != 0) {
							require(1);
							position++;
							b = niobuffer.get();
							result |= (long)(b & 0x7F) << 35;
							if ((b & 0x80) != 0) {
								require(1);
								position++;
								b = niobuffer.get();
								result |= (long)(b & 0x7F) << 42;
								if ((b & 0x80) != 0) {
									require(1);
									position++;
									b = niobuffer.get();
									result |= (long)(b & 0x7F) << 49;
									if ((b & 0x80) != 0) {
										require(1);
										position++;
										b = niobuffer.get();
										result |= (long)b << 56;
									}
								}
							}
						}
					}
				}
			}
		}
		if (!optimizePositive) result = (result >>> 1) ^ -(result & 1);
		return result;
	}