private static byte[] SwfReadEncodedU32Data(BinaryReader source)
{
List<byte> bytes = new List<byte>();
byte b;
do
{
b = source.ReadByte(); // Read one byte from the stream
bytes.Add(b); // and add it to the result
if (bytes.Count == 5) // if the max. Limit of five bytes is reached
break; // stop reading any further bytes
} while ((b & 128) == 128); // if the msb(128) is set the next byte is part
// of the value
return bytes.ToArray(); // return the bytes read
}