I'd just allocate a byte array and use pointers of various types, pointing to different locations within the array, to read the data. This is the most flexible approach, as structs, which seem to be encouraged much for this type of work, fail for strings of variable length, data that can be in different formats depending on other values in the array, etc.