I was looking around the Minecraft's internal packet handling when I saw their VarInt reading code to read the packet length. As a java developer that does not have any course of java I was confused when I saw the statement out |= ( in & 0x7F ) << ( bytes++ * 7 );
. Can someone please explain it to me? Thanks in advance!
If you want the whole code, just check the readVarInt function on BungeeCord's Github https://github.com/SpigotMC/BungeeCord/blob/master/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java#L70 .