1. A method for compressing data, the method comprising: receiving a data string comprising a first set of symbols; transforming the data string into a generalized message comprising a second set of symbols by mapping the data string to the generalized message via an inverse of a transformation function; identifying, based on a polar code, fixed symbols of the generalized message; and generating a compressed data string by extracting the fixed symbols from the generalized message and concatenating the fixed symbols into the compressed data string, thereby transforming the generalized message into the compressed data string.