Did some re-org and added a tools directory.
This commit is contained in:
parent
308e1b7fe4
commit
f7498ab93c
4
README
4
README
|
@ -16,12 +16,14 @@ that uses the Intel SIMD instruction set for Vandermonde Reed-Solomon encoding
|
|||
and "Screaming fast Galois Field arithmetic using Intel SIMD instructions" in
|
||||
USENIX FAST 2013).
|
||||
|
||||
Examples of using this library are provided in ./test:
|
||||
Examples of using this library are provided in ./tools:
|
||||
|
||||
Command-line encoder: ec_pyeclib_encode.py
|
||||
|
||||
Command-line decoder: ec_pyeclib_decode.py
|
||||
|
||||
Utility to determine what is needed to reconstruct missing fragments: pyeclib_fragments_needed.py
|
||||
|
||||
The main Python interface only contains 6 functions:
|
||||
|
||||
Encode N bytes into k+m fragments (returns list of fragments):
|
||||
|
|
|
@ -32,7 +32,6 @@ class ECPyECLibDriver(object):
|
|||
self.ec_flat_xor_3 = "flat_xor_3"
|
||||
self.ec_flat_xor_4 = "flat_xor_4"
|
||||
self.ec_types = [self.ec_rs_vand, self.ec_rs_cauchy_orig, self.ec_flat_xor_3, self.ec_flat_xor_4]
|
||||
self.ec_valid_xor_params = ["12_6_4", "10_5_3"]
|
||||
self.ec_rs_vand_best_w = 16
|
||||
self.ec_default_w = 32
|
||||
self.ec_rs_cauchy_best_w = 4
|
||||
|
|
|
@ -26,6 +26,7 @@ FILE_DIR=./test_files
|
|||
DECODED_DIR=./decoded_files
|
||||
FRAGMENT_DIR=./test_fragments
|
||||
FILES=`echo ${FILE_DIR}`
|
||||
TOOLS_DIR=../tools
|
||||
|
||||
if [ ! -d ${DECODED_DIR} ]; then
|
||||
mkdir ${DECODED_DIR}
|
||||
|
@ -62,7 +63,7 @@ for TYPE in ${TYPES}; do
|
|||
FAULT_TOL="2"
|
||||
fi
|
||||
for file in `cd ${FILES}; echo *; cd ..`; do
|
||||
python ec_pyeclib_encode.py ${NUM_DATA} ${NUM_PARITY} ${TYPE} ${FILE_DIR} ${file} ${FRAGMENT_DIR}
|
||||
python ${TOOLS_DIR}/pyeclib_encode.py ${NUM_DATA} ${NUM_PARITY} ${TYPE} ${FILE_DIR} ${file} ${FRAGMENT_DIR}
|
||||
done
|
||||
|
||||
for file in `cd ${FILES}; echo *; cd ..`; do
|
||||
|
@ -73,7 +74,7 @@ for TYPE in ${TYPES}; do
|
|||
fragments[${index}]=""
|
||||
let i=$i+1
|
||||
done
|
||||
python ec_pyeclib_decode.py ${NUM_DATA} ${NUM_PARITY} ${TYPE} ${fragments[*]} ${DECODED_DIR}/${file}
|
||||
python ${TOOLS_DIR}/pyeclib_decode.py ${NUM_DATA} ${NUM_PARITY} ${TYPE} ${fragments[*]} ${DECODED_DIR}/${file}
|
||||
diff ${FILE_DIR}/${file} ${DECODED_DIR}/${file}.decoded
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "${FILE_DIR}/${file} != ${DECODED_DIR}/${file}.decoded"
|
||||
|
@ -85,4 +86,4 @@ for TYPE in ${TYPES}; do
|
|||
done
|
||||
|
||||
rm ${DECODED_DIR}/*
|
||||
rm ${FRAGMENT_DIR}/*
|
||||
rm ${FRAGMENT_DIR}/*
|
||||
|
|
|
@ -78,4 +78,4 @@ def pyeclib_core_valgrind():
|
|||
|
||||
test_c_stuff()
|
||||
pyeclib_core_test()
|
||||
pyeclib_core_valgrind()
|
||||
#pyeclib_core_valgrind()
|
||||
|
|
|
@ -30,7 +30,7 @@ import sys
|
|||
import os
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description='Encoder for PyECLib.')
|
||||
parser = argparse.ArgumentParser(description='PyECLib tool to determine fragment indexes needed to recover missing fragments.')
|
||||
parser.add_argument('k', type=int, help='number of data elements')
|
||||
parser.add_argument('m', type=int, help='number of parity elements')
|
||||
parser.add_argument('type', help='EC algorithm used')
|
Loading…
Reference in New Issue