Git Product home page Git Product logo

toftrecovery's Introduction

2-of-3 Recovery Tool (Python 3)

Recover an original file from 3 different corrupted copies

Main function iterates through 3 corrupted copies and simply compares them byte-by-byte. If at least 2 corrupted versions have the equal value for the same byte location, then we keep the value for reconsturcting the original file as we can have high level of confidence that it is same value as in the original file.

In case the byte value is corrupted at the same location in 2 seperate copies, we get 3 different values for the same byte and we can no longer determine which one we should keep. Therefore we create 3 different new branches for the recovered bytes and temporarily keep all of the 3 values in these new branches.

At the end of bytes reconstruction phase we may end up with many versions based on branches.

And finally we look at the checksums of these temporary recovery branches and look for a match with the original file hash to verify that we have a recovery branch 100% same as the original file.

Notes:

Branching level increases resource intensity exponentially

Cannot recover files under these conditions:

  • Bit-level corruption happened simultaneosly in 2 seperate copies, which is extremely unlikely.

  • If corrupted file lengths are different then the current byte comparison algorithm won't work properly.

toftrecovery's People

Contributors

yagizc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.