Convert between bytes, Data instances, and Strings. They're all easily interchangeable when your data bytes represent Strings using your expected encoding.
operates on a constant mysteryDataURL and my playground gives me an error to change ‘let’ to ‘var’ to make mysteryDataURL mutable. But yours isn’t mutable either… why aren’t you getting the same error?
I was wondering if you might now how to do the following. I have been pulling my hair out and scouring the internet trying to piece together information regarding it.
I am wanting to take a Swift class instance, and convert it into its binary data, so I can perform an XOR, and store the difference between two different instances. I would then apply or remove the stored xor result to move between the two states. Kind of like an undo/redo.
I have been pulling my hair out trying to wrap my hair around Swifts Data, and converting data to bytes.