private static byte[] trimLeadingZeros(byte[] bytes, int minTrimLen) {
		int firstUsedByteIndex = 0;
		for (; firstUsedByteIndex < bytes.length &&
			bytes[firstUsedByteIndex] == 0; firstUsedByteIndex++) {
			// no op
		}

		int bytesToCopy = bytes.length - firstUsedByteIndex;
		int newLen = Math.max(bytesToCopy, minTrimLen);
		if (newLen > 1) {
			newLen += (newLen % 2);
		}
		byte[] newBytes = new byte[newLen];
		System.arraycopy(bytes, firstUsedByteIndex, newBytes, newLen - bytesToCopy, bytesToCopy);

		return newBytes;
	}
A hover service to show tool tip text for hovering over scalar values.
The tooltip shows the scalar in different bases.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractScalarOperandHover.java