ICSharpCode.SharpZipLib.Zip.ZipInputStream.CompleteCloseEntry C# (CSharp) Method

CompleteCloseEntry() private method

Complete cleanup as the final part of closing.
private CompleteCloseEntry ( bool testCrc ) : void
testCrc bool True if the crc value should be tested
return void
        void CompleteCloseEntry(bool testCrc)
        {
            StopDecrypting();

            if ((flags & 8) != 0) {
                ReadDataDescriptor();
            }

            size = 0;

            if (testCrc &&
                ((crc.Value & 0xFFFFFFFFL) != entry.Crc) && (entry.Crc != -1)) {
                throw new ZipException("CRC mismatch");
            }

            crc.Reset();

            if (method == (int)CompressionMethod.Deflated) {
                inf.Reset();
            }
            entry = null;
        }