A system, method and apparatus are provided for encoding and decoding a
source file. The source file is encoded by dividing it into a plurality
of shares comprised of a plurality of packets. A bit vector is generated.
For at least one share, an FEC packet is generated by XOR'ing a subset of
packets from the plurality of packets in the share in accordance with the
bit vector. The process of encoding continues until terminated. Once the
FEC encoded packets are received, each of the plurality of packets which
is not a linear combination of previously received packets is stored into
a file. A sequence of XOR operations to perform in-place on the file to
reconstruct the source file are generated and performed on the file.