Added CompactDecode with unit tests