A method for encoding a stream of source packets, in which a plurality of k source packets are packet-level forward error correction encoded to form a plurality of n-k error-correcting wildcard packets, the k source packets and n-k wildcard packets to be transmitted to a receiver, comprising the steps of:
- after the arrival of each source packet, for each byte of said source packet, computing the respective error correction contributions to the corresponding bytes of said plurality of wildcard packets;
- transmitting said source packet to the receiver without waiting for the arrival of another source packet of said plurality of source packets;
- for each wildcard packet byte, summing said error correction contribution of the source packet in an accumulator;
- after the error correction contributions have been computed using all k source packets and summed for all n-k wildcard packets, transmitting the wildcard packets to the receiver.