tahoe-lafs / zfec

zfec -- an efficient, portable erasure coding tool
Other
374 stars 44 forks source link

Python Code example for file encode and decode #8

Open MourIdri opened 6 years ago

MourIdri commented 6 years ago

Hi team, I Saw your documentation for tahoe-fafs. The CLi seems to be well documented, however, regarding Python API it is a little bit short. Could you add an example of a small script of file encoding and decoding ? Thanks.

cllx commented 1 year ago

filefec.encode_to_files(inf, fsize, dirname, prefix, k, m, suffix=".fec", overwrite=False, verbose=False)

filefec.decode_from_files(outf, infiles, verbose=False)

sajith commented 1 year ago

Hi team, I Saw your documentation for tahoe-fafs. The CLi seems to be well documented, however, regarding Python API it is a little bit short. Could you add an example of a small script of file encoding and decoding ? Thanks.

Do the tests help? Like this one, for example:

https://github.com/tahoe-lafs/zfec/blob/612368e934d7d45233ede54451a19e681baa7aa3/zfec/test/test_zfec.py#L114-L128