#!/bin/bash SIZE_INI=$((500 * 1024 * 1024)) SIZE_TRUNCATE="400MB" #cat /dev/random | head -c ${SIZE_INI} > /tmp/data ls -ahl /tmp/data cargo build --release /home/user/dev/mla/target/release/mlar create -p /home/user/dev/mla/samples/test_x25519_archive_v1_pub.pem -o /tmp/out.mla -- /tmp/data #cp /tmp/out.mla.bak /tmp/out.mla ls -ahl /tmp/out.mla truncate --size ${SIZE_TRUNCATE} /tmp/out.mla echo "--- REPAIR ---" time cargo run --release repair -i /tmp/out.mla -o /tmp/out_repair.mla -p /home/user/dev/mla/samples/test_x25519_archive_v1_pub.pem -k /home/user/dev/mla/samples/test_x25519_archive_v1.pem /home/user/dev/mla/target/release/mlar cat /tmp/data -i /tmp/out_repair.mla -k /home/user/dev/mla/samples/test_x25519_archive_v1.pem > /tmp/extracted ls -l /tmp/extracted python3 compare.py /tmp/data /tmp/extracted