add self-describing encoding