Container sorting scenarios and demos - darrenldl/blockyarchive GitHub Wiki
Purpose
This page discusses scenarios related to sorting SBX containers. Not all scenarios are designed to be realistic, they are designed to illustrate various techniques for you to pick and apply for your specific scenario.
You want to adjust the burst error resistance level
You can supply --burst
flag to specify the burst error resistance level to use for the sorted container.
You only want to check if the container blocks are in the correct order
You can supply --dry-run
flag to sort mode and it'll only report the statistics without writing to any files.
You want to merge multiple corrupted copies to get a good copy
Sort mode supports --multi-pass
for updating the final container across multiple runs, this essentially allows you to "merge" several partially good containers together.
Say we have test.ecsbx.0
, test.ecsbx.1
, test.ecsbx.2
which all have varying degrees of damage upon checking with check mode, and repair mode dry run tells you they cannot be repaired successfully. Now you want to merge all of the good blocks together and see if that fixes it or allows repair mode to do something at least. You can do the following
$ blkar sort --multi-pass test.ecsbx.0 merged.ecsbx
$ blkar sort --multi-pass test.ecsbx.1 merged.ecsbx
$ blkar sort --multi-pass test.ecsbx.2 merged.ecsbx
then check and/or repair as you see fit
$ blkar check merged.ecsbx
$ blkar repair merged.ecsbx
The demo uses SBX rather than ECSBX, but everything looks basically the same for ECSBX sorting.