Hacker News new | ask | show | jobs
by CoolGuySteve 4972 days ago
Here you go: http://atomicparsley.sourceforge.net/mpeg-4files.html

Nearly everything inherits from a basic struct that is 8 bytes per atom: { length of self + children, quasi-human readable 4 char code describing contents }

Practically speaking, in C/C++, you can stride by length and switch() on the ftype, using it to cast the read-in data to whatever class/struct you desire.

All of this while being so brutally dumb that you can rewrite it over and over again in about 10 lines of code in most languages.

1 comments

This is pretty much IFF: http://en.wikipedia.org/wiki/Interchange_File_Format

I suspect that's where it originated.