Magic number is used to differentiate between the different EnumSet subtypes, as shown below. When writing, this byte is written according to the type of the enumset. This is a very efficient way to specify a type in a payload, without the need of specifying a full class name or Class instance.