ZForge.Controls.TreeViewAdv.GifDecoder.ReadBlock C# (CSharp) Method

ReadBlock() private method

private ReadBlock ( ) : int
return int
        private int ReadBlock()
        {
            blockSize = Read();
            int n = 0;
            if (blockSize > 0)
            {
                try
                {
                    int count = 0;
                    while (n < blockSize)
                    {
                        count = inStream.Read(block, n, blockSize - n);
                        if (count == -1)
                            break;
                        n += count;
                    }
                }
                catch (IOException)
                {
                }

                if (n < blockSize)
                {
                    status = StatusFormatError;
                }
            }
            return n;
        }