Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ZipLocalFileHeader.cs
Go to the documentation of this file.
3
5
6[StructLayout(LayoutKind.Sequential, Size = 1)]
7internal readonly struct ZipLocalFileHeader
8{
10 {
11 reader.BaseStream.Seek(26L, SeekOrigin.Current);
12 ushort num = reader.ReadUInt16();
13 ushort num2 = reader.ReadUInt16();
14 reader.BaseStream.Seek(num, SeekOrigin.Current);
16 using (Stream extraFieldData = new SubReadStream(reader.BaseStream, reader.BaseStream.Position, num2))
17 {
19 }
21 return list;
22 }
23
24 public static bool TrySkipBlock(BinaryReader reader)
25 {
26 if (reader.ReadUInt32() != 67324752)
27 {
28 return false;
29 }
30 if (reader.BaseStream.Length < reader.BaseStream.Position + 22)
31 {
32 return false;
33 }
34 reader.BaseStream.Seek(22L, SeekOrigin.Current);
35 ushort num = reader.ReadUInt16();
36 ushort num2 = reader.ReadUInt16();
37 if (reader.BaseStream.Length < reader.BaseStream.Position + num + num2)
38 {
39 return false;
40 }
41 reader.BaseStream.Seek(num + num2, SeekOrigin.Current);
42 return true;
43 }
44}
virtual ushort ReadUInt16()
virtual Stream BaseStream
virtual uint ReadUInt32()
static void RemoveZip64Blocks(List< ZipGenericExtraField > extraFields)
static List< ZipGenericExtraField > ParseExtraField(Stream extraFieldData)
static List< ZipGenericExtraField > GetExtraFields(BinaryReader reader)
static bool TrySkipBlock(BinaryReader reader)