Adding c ext for boolean encoding