@Override
	public Object getValue(MemBuffer buf, Settings settings, int maxLength) {
		if (maxLength < 0) {
			maxLength = LEB128.MAX_SUPPORTED_LENGTH;
		}

		int len = getLength(buf, maxLength);
		if (len < 1) {
			return null; // error, or more than 10 bytes long
		}

		long val;
		try (InputStream is = buf.getInputStream(0, maxLength)) {
			val = LEB128.read(is, signed);
		}
		catch (IOException e) {
			return null;	// error, or more than 10 bytes long
		}

		// approximate bitLength from storage byte length
		int bitLength = Math.min(64, len * 7);
		int mod = bitLength % 8;
		if (mod != 0) {
			bitLength += (8 - mod);
		}

		return new Scalar(bitLength, val, signed);
	}
Base constructor for a little endian based 128 data type.
@param name name of the leb128 data type that extends this class.
@param signed true if it is signed. false if unsigned.
@param dtm the data type manager to associate with this data type.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/AbstractLeb128DataType.java