Two generalized codes for data processing