OpenHome.Git.Pack.ReadItemTypeAndLength C# (CSharp) 메소드

ReadItemTypeAndLength() 정적인 개인적인 메소드

static private ReadItemTypeAndLength ( BinaryReader aReader, long &aLength ) : int
aReader System.IO.BinaryReader
aLength long
리턴 int
        internal static int ReadItemTypeAndLength(BinaryReader aReader, out long aLength)
        {
            byte b = aReader.ReadByte();

            int type = b >> 4 & 0x07;

            aLength = b & 0x0f;

            int shift = 4;

            while ((b & 0x80) > 0)
            {
                b = aReader.ReadByte();

                aLength += (b & 0x7f) << shift;

                shift += 7;
            }

            return (type);
        }