1. A method for coding data in a wireless communication system, the method comprising: generating one or more permutations of data; determining weights for the one or more permutations; calculating, by a processor, one or more code packets from each permutation using the determined weights, wherein the weight determined for a permutation indicates of an amount of the permutation used in calculating each of the one or more code packets; multiplexing the data and the one or more code packets into a code packet stream; and transmitting the code packet stream over a network.