public static uint ReadCompressedUInt32(this IBinaryStreamReader reader)
{
var firstByte = reader.ReadByte();
if ((firstByte & 0x80) == 0)
return firstByte;
if ((firstByte & 0x40) == 0)
return (uint)(((firstByte & 0x7F) << 8) | reader.ReadByte());
return (uint)(((firstByte & 0x3F) << 0x18) |
(reader.ReadByte() << 0x10) |
(reader.ReadByte() << 0x08) |
reader.ReadByte());
}