Git Product home page Git Product logo

biodiff's Introduction

biodiff

Crates.io

Compare binary files using alignment algorithms.

Terminal screenshot of biodiff. One can see two files displayed in hex above each other with an ascii column. There are areas that are skipped in one file and displayed in green in the other one. Common bytes are displayed as white and differing ones (aside from missing ones) as red.

What is this

This is a tool for binary diffing.

The tool is able to show two binary files side by side so that similar places will be at the same position on both sides and bytes missing from one side are padded. It uses bio-informatics algorithms from the rust-bio library (typically used for DNA sequence alignment) for that. The dialog boxes for configuration are done using cursive.

Usage

Execute biodiff file_a file_b in a terminal and you should be dropped into a hex view showing two files side by side. Initially, the files will not be aligned and displayed without gaps on each side. By moving the cursor and views to a place where the left side and right side are similar and pressing F3, they can be aligned. This is done block by block in standard configuration, which means that bytes near the cursor are aligned first and the other displayed later.

It is also possible to do global and local alignment (of the whole files at once) by changing the settings using F4 (be sure to consult the help on the parameters). Generally, since it takes quadratic time and space, the global/local alignment will not work well for files bigger than 64kB. There is also a "banded" algorithm which is faster, but slightly less accurate.

Installation

There should be downloadable binary files for some environments under the releases page. Alternatively, you can also install this using cargo by doing cargo install biodiff.

You can also execute directly using code from this repository by executing cargo run --release -- file_a file_b.

License

This project is licensed under the MIT license.

biodiff's People

Contributors

8051enthusiast avatar pothos avatar

Watchers

James Cloos 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.