Analysis of polymers using evolved-gas and direct-pyrolysis techniques