add test for compact encoding