parse struct definition and read from raw data