D | fec.py | 26 def corrupt(image, offset, length): argument 28 f = os.open(image, os.O_WRONLY) 33 def corruptmax(image, roots): argument 34 size = os.stat(image).st_size 42 corrupt(image, offset, max_errors) 44 def encode(image, fec, roots): argument 45 if subprocess.call([ "fec", "--roots= " + str(roots), image, fec ]) != 0: 48 def decode(image, fec, output): argument 49 return subprocess.call([ "fec", "--decode", image, fec, output ]) 54 def simg2img(image, output): argument [all …]
|