public static RemoveZip64Blocks ( List |
||
extraFields | List |
|
return | void |
public static List <ZipGenericExtraField> GetExtraFields(BinaryReader reader) { List <ZipGenericExtraField> zipGenericExtraFields; reader.BaseStream.Seek((long)26, SeekOrigin.Current); ushort num = reader.ReadUInt16(); ushort num1 = reader.ReadUInt16(); reader.BaseStream.Seek((long)num, SeekOrigin.Current); using (Stream subReadStream = new SubReadStream(reader.BaseStream, reader.BaseStream.Position, (long)num1)) { zipGenericExtraFields = ZipGenericExtraField.ParseExtraField(subReadStream); } Zip64ExtraField.RemoveZip64Blocks(zipGenericExtraFields); return(zipGenericExtraFields); }
public static List <ZipGenericExtraField> GetExtraFields(BinaryReader reader) { // assumes that TrySkipBlock has already been called, so we don't have to validate twice List <ZipGenericExtraField> result; const int OffsetToFilenameLength = 26; // from the point before the signature reader.BaseStream.Seek(OffsetToFilenameLength, SeekOrigin.Current); ushort filenameLength = reader.ReadUInt16(); ushort extraFieldLength = reader.ReadUInt16(); reader.BaseStream.Seek(filenameLength, SeekOrigin.Current); using (Stream str = new SubReadStream(reader.BaseStream, reader.BaseStream.Position, extraFieldLength)) { result = ZipGenericExtraField.ParseExtraField(str); } Zip64ExtraField.RemoveZip64Blocks(result); return(result); }