I want to read a binary file into swift data structures, and then perhaps write it back after processing.
What would be the idiomatic way to do that? I know how to do it in Objective-C, but I would like to try Swift for this, in the most "Swifty" way as possible. I am a Swift newbie, but I am willing to learn.
FWIW, The binary file is organized as a tree of typed "chunks", potentially nested, where the first field for a chunk is its length. Data is encoded big-endian.
Thanks for any pointer/general outline