Those four letter chunk IDs seem suspiciously like IFF (https://en.wikipedia.org/wiki/Interchange_File_Format) in which case there's a bunch of generic parsing/extraction code out there which will avoid a lot of reinventing the wheel here.
For some tags the file format deviates from the pattern. E.g VERS does not have a length field.