def decode(self, fs: FileStream): offset = fs.position self.signature = fs.read_string() assert self.signature == UnitySignature.UnityFS self.version = fs.read_sint32() assert self.version != 5 self.unity_web_bundle_version = fs.read_string() self.unity_web_minimum_revision = fs.read_string() self.size = fs.read_uint64() self.compressed_blocks_info_size = fs.read_uint32() self.uncompressed_blocks_info_size = fs.read_uint32() assert self.compressed_blocks_info_size < self.uncompressed_blocks_info_size, vars( self) self.flags = fs.read_uint32() self.header_size = fs.position - offset
def decode(self, fs: FileStream): self.offset = fs.read_uint64() self.size = fs.read_uint64() self.flags = fs.read_uint32() self.path = fs.read_string()