Ancient codex deciphering