internal static ZipIOCentralDirectoryDigitalSignature ParseRecord(BinaryReader reader)
        {
            // this record is optional, so let's check for presence of signature rightaway

            //let's ensure we have at least enough data to cover _fixedMinimalRecordSize bytes of signature
            if ((reader.BaseStream.Length - reader.BaseStream.Position) < _fixedMinimalRecordSize)
            {
                return(null);
            }

            UInt32 signatureValue = reader.ReadUInt32();

            if (signatureValue != _signatureConstant)
            {
                return(null);
            }

            //at this point we can assume that Digital Signature Record is there
            // Convention is to throw
            throw new NotSupportedException(SR.Get(SRID.ZipNotSupportedSignedArchive));

// disable creation/parsing of zip archive digital signatures
#if ArchiveSignaturesEnabled
            ZipIOCentralDirectoryDigitalSignature record = new ZipIOCentralDirectoryDigitalSignature();

            record._signature     = signatureValue;
            record._sizeOfData    = reader.ReadUInt16();
            record._signatureData = reader.ReadBytes(record._sizeOfData);

            record.Validate();

            return(record);
#endif
        }
        internal static ZipIOCentralDirectoryDigitalSignature ParseRecord(BinaryReader reader)
        {
            // this record is optional, so let's check for presence of signature rightaway 

            //let's ensure we have at least enough data to cover _fixedMinimalRecordSize bytes of signature
            if ((reader.BaseStream.Length - reader.BaseStream.Position) < _fixedMinimalRecordSize)
            {
                return null;
            }

            UInt32 signatureValue = reader.ReadUInt32();
            if (signatureValue != _signatureConstant)
            {
                return null;
            }

            //at this point we can assume that Digital Signature Record is there 
            // Convention is to throw
            throw new NotSupportedException(SR.Get(SRID.ZipNotSupportedSignedArchive));

// Zeus PS 3: disable creation/parsing of zip archive digital signatures
#if ArchiveSignaturesEnabled
            ZipIOCentralDirectoryDigitalSignature record = new ZipIOCentralDirectoryDigitalSignature ();

            record._signature = signatureValue;
            record._sizeOfData = reader.ReadUInt16();
            record._signatureData = reader.ReadBytes(record._sizeOfData );

            record.Validate();

            return record;
#endif
        }