Reading wmv


wotsit.org only had a link to the msdn asf file. I downloaded the asf.doc file and read it. There are many headers. In several of the length fields it said “varies” meow.

How do you set up a prog to read a file or ram with an unknown “varies” length in the header?

Also while looking at a wmv file it seemed to be zero padded and there was no documentation in this.

A source code example on reading many headers with “variable” lengths is what I would like to look at.
All I can think of is many “if” statements to handle this. Is there a better way?