Converting Class objects into Data to serialise as .dat file

Hi everyone,

I am trying to convert a class object into Data and then serialise it into a dat file, and then be able to convert the .dat file back into data and then back into an object to use.

I have been working with Metal and alot of the GRPU buffer implementation, but was wondering if anyone has some examples of how this could be done in Swift, and not have to use the Metal module.

One of my reasons for this is also comparing byte data of two instances and recording the byte changes. utilising this in an undo/redo mechanism.

Thank you for the help
Simon

1 Like