OpenMetaverse.Primitive.TextureEntry.ReadFaceBitfield C# (CSharp) Method

ReadFaceBitfield() private method

private ReadFaceBitfield ( byte data, int &pos, uint &faceBits, uint &bitfieldSize ) : bool
data byte
pos int
faceBits uint
bitfieldSize uint
return bool
            private bool ReadFaceBitfield(byte[] data, ref int pos, ref uint faceBits, ref uint bitfieldSize)
            {
                faceBits = 0;
                bitfieldSize = 0;

                if (pos >= data.Length)
                    return false;

                byte b = 0;
                do
                {
                    b = data[pos];
                    faceBits = (faceBits << 7) | (uint)(b & 0x7F);
                    bitfieldSize += 7;
                    pos++;
                }
                while ((b & 0x80) != 0);

                return (faceBits != 0);
            }