private static int decodeCompressedInt(BinaryReader reader, boolean signed) throws IOException {
		byte firstByte = reader.peekNextByte();
		boolean isLittleEndian = reader.isLittleEndian();
		reader.setLittleEndian(false);
		int numBytes = getNumberBytesInCodedInt(firstByte);
		int decodedSize = 0;
		switch (numBytes) {
			case 1:
				byte codedByte = reader.readNextByte();
				if (signed)
					decodedSize = decodeCompressedSigned(codedByte);
				else
					decodedSize = decodeCompressedUnsigned(codedByte);
				break;
				
			case 2:
				short codedShort = reader.readNextShort();
				if (signed)
					decodedSize = decodeCompressedSigned(codedShort);
				else
					decodedSize = decodeCompressedUnsigned(codedShort);
				break;
				
			case 4:
				int codedInt = reader.readNextInt();
				if (signed)
					decodedSize = decodeCompressedSigned(codedInt);
				else
					decodedSize = decodeCompressedUnsigned(codedInt);
				break;
				
			default:
				break;
		}
		reader.setLittleEndian(isLittleEndian);
		return decodedSize;
	}
Rotates toRotate circularly right using a maximum of bitSize bits for the numeric representation.
Bits must be in the rightmost (least significant) positions.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/cli/blobs/CliBlob.java