Creating a Parsing Function
Before we can start unpacking an entire archive we need to think smaller. A filepack archive is made up of one or more different FileData values, and each of those FileData values are in turn made up of all of the individual values in the overall record. If we want to unpack a FileData, we’ll need to start by being able to unpack each of the individual types that make up a FileData record.
Let’s start by decoding Word32 values. Not only do we need to decode these because they are one of the types that make up a FileData record, but we’re also going to need to deal with the Word32 size field prefixes that we added to help us encode compound values more easily.
We already have a Decode instance for Word32 that makes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access