Encode word length in order to reduce data size