I worked on this with craz, taking directly "decompiled" code into a useful form. This was by far one of the most interesting things I've ever done -- if you want to get into reversing or increase your skills, do a codec! I built a stupid simple reference encoder in Python right after, but never managed to really get it right; wonder if I still have all the old code around.