Abstract: A multi-level error correction technique for maintaining data integrity in a data recording/recovery device is presented. Data is stored in buffer packets in a segment of a data buffer before being recorded to a storage medium. Error correction codes are generated over a plurality of instances of a plurality of buffer packet patterns in the segment, and are recorded along with all of the buffer packets onto a storage medium. During data recovery from the storage medium, recovered error correction code packets are used to perform multi-level segment correction on the recovered data packets.