Fixed codec for reading definitions