@@ -29,27 +29,27 @@ public Header(string signature, UInt32 version, string unityVersion, string unit
2929 Flags = flags ;
3030 }
3131
32- public static Header ParseFromReader ( AssetReader reader ) => new (
33- reader . ReadStringToNull ( ) ,
34- reader . ReadUInt32 ( ) ,
35- reader . ReadStringToNull ( ) ,
36- reader . ReadStringToNull ( ) ,
37- reader . ReadInt64 ( ) ,
38- reader . ReadUInt32 ( ) ,
39- reader . ReadUInt32 ( ) ,
40- ( ArchiveFlags ) reader . ReadUInt32 ( )
32+ public static Header Parse ( ref DataBuffer db ) => new (
33+ db . ReadNullTerminatedString ( ) ,
34+ db . ReadUInt32 ( ) ,
35+ db . ReadNullTerminatedString ( ) ,
36+ db . ReadNullTerminatedString ( ) ,
37+ db . ReadInt64 ( ) ,
38+ db . ReadUInt32 ( ) ,
39+ db . ReadUInt32 ( ) ,
40+ ( ArchiveFlags ) db . ReadUInt32 ( )
4141 ) ;
4242
43- public void Serialize ( AssetWriter writer )
43+ public void Serialize ( ref DataBuffer db )
4444 {
45- writer . WriteStringToNull ( Signature ) ;
46- writer . WriteUInt32 ( Version ) ;
47- writer . WriteStringToNull ( UnityVersion ) ;
48- writer . WriteStringToNull ( UnityRevision ) ;
49- writer . WriteInt64 ( Size ) ;
50- writer . WriteUInt32 ( CompressedBlocksInfoSize ) ;
51- writer . WriteUInt32 ( UncompressedBlocksInfoSize ) ;
52- writer . WriteUInt32 ( ( UInt32 ) Flags ) ;
45+ db . WriteNullTerminatedString ( Signature ) ;
46+ db . WriteUInt32 ( Version ) ;
47+ db . WriteNullTerminatedString ( UnityVersion ) ;
48+ db . WriteNullTerminatedString ( UnityRevision ) ;
49+ db . WriteInt64 ( Size ) ;
50+ db . WriteUInt32 ( CompressedBlocksInfoSize ) ;
51+ db . WriteUInt32 ( UncompressedBlocksInfoSize ) ;
52+ db . WriteUInt32 ( ( UInt32 ) Flags ) ;
5353 }
5454
5555 public long SerializeSize => 27 + Signature . Length + UnityVersion . Length + UnityRevision . Length ;
0 commit comments