[matroska-devel] Re: Matroska/EBML specs ??
spyder at wiesneronline.net
Thu Feb 20 15:22:31 CET 2003
> As for the parser,.. as spyder we are also weighing the difference between
> sax or tree.. the tree would have worse performance than the sax for big
> ebml docs,... say something around 50 MB sized files,.. but somethings can
> be better acheived with a sax parser, using callbacks etc,... anyone with
> any ideas.. ??
I think I will do both. Possibly making a way to mix the two if necessary.
For example, parsing a tree of small elements could be easier without SAX.
If I could mix the two in some way, it would be nice. The SAX callback
feature will be nice in future versions where I want to quickly add a new
element type. My current idea is to use a registry of element handlers,
adding new ones if needed to make a simple, linear parser. The only real
drawback so far is that there is no way to easily determine the end of an
element as in XML. This makes SAX parsing a bit more difficult. I would
need some method of caching positions in the stream that mark the ending of
the elements based on the element size. Some ideas on this part would be
much appreciated. I was also thinking of making some form of parser
generator that builds classes based on an XML file describing the structure
of a specific format. We should get together one day on IRC or some other
faster method of communication if possible. I look forward to hearing your
ideas. I am working very slowly on this code, not because I'm just
lazy(which I am) but I also want to do this right the first time.
spyder482 at matroska.org
More information about the Matroska-devel