{"id":13685789,"url":"https://github.com/8051Enthusiast/biodiff","last_synced_at":"2025-05-01T04:32:22.764Z","repository":{"id":37985192,"uuid":"369979546","full_name":"8051Enthusiast/biodiff","owner":"8051Enthusiast","description":"Hex diff viewer using alignment algorithms from biology","archived":false,"fork":false,"pushed_at":"2024-08-07T17:47:19.000Z","size":433,"stargazers_count":821,"open_issues_count":6,"forks_count":26,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-11-12T07:38:36.768Z","etag":null,"topics":["reverse-engineering","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/8051Enthusiast.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-23T06:37:49.000Z","updated_at":"2024-10-25T09:56:34.000Z","dependencies_parsed_at":"2022-09-08T14:52:58.554Z","dependency_job_id":"bbbd332f-16ec-4cd9-9bf6-9da890a56e1d","html_url":"https://github.com/8051Enthusiast/biodiff","commit_stats":{"total_commits":120,"total_committers":3,"mean_commits":40.0,"dds":0.01666666666666672,"last_synced_commit":"b18bcd1d8645d8e5e3da3c5abf407032cf7556ec"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8051Enthusiast%2Fbiodiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8051Enthusiast%2Fbiodiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8051Enthusiast%2Fbiodiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8051Enthusiast%2Fbiodiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/8051Enthusiast","download_url":"https://codeload.github.com/8051Enthusiast/biodiff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251824595,"owners_count":21649894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["reverse-engineering","terminal"],"created_at":"2024-08-02T14:00:57.375Z","updated_at":"2025-05-01T04:32:22.411Z","avatar_url":"https://github.com/8051Enthusiast.png","language":"Rust","funding_links":[],"categories":["Awesome Repositories","🛠️ General Tools"],"sub_categories":["ELF binary format","🔬 Format Analysis \u0026 Reverse Engineering"],"readme":"biodiff\n=======\n\n[![Crates.io](https://img.shields.io/crates/v/biodiff)](https://crates.io/crates/biodiff)\n[![Packaging status](https://repology.org/badge/tiny-repos/biodiff.svg)](https://repology.org/project/biodiff/versions)\n\nCompare binary files using alignment algorithms.\n\n![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.](https://user-images.githubusercontent.com/54916925/123559715-fda1aa80-d79d-11eb-8bcd-90316e388e48.png)\n\nWhat is this\n------------\nThis is a tool for binary diffing.\n\nThe tool is able to show two binary files side by side so that similar places will be at the same position on both sides\nand bytes missing from one side are padded.\nIt uses bio-informatics algorithms from the ['wfa2'](https://github.com/smarco/WFA2-lib) or [`rust-bio`](https://rust-bio.github.io/) library (typically used for DNA sequence alignment) for that.\nThe dialog boxes for configuration are done using [`cursive`](https://github.com/gyscos/cursive).\n\nFeatures\n--------\n* Unaligned view for moving both sides independently as contiguous byte segments\n* Aligned view for comparing corresponding bytes of both files\n* Many configurable byte representations (bases 2, 8, 10, 16; mixed ascii/hex, braille, roman numerals)\n* Right-to-left mode, horizontal and vertical split, ascii and bar column\n* Configurable bytes per row, adjustable by pressing `[`, `]`, `0`\n* Automatic determination of width by finding repetitions in visible/selected bytes by pressing '='\n* Search using text, regex and hexagex\n\nUsage\n-----\nExecute `biodiff file_a file_b` in a terminal and you should be dropped into a hex view showing two files side by side.\nInitially, the files will not be aligned and displayed without gaps on each side.\nBy moving the cursor and views to a place where the left side and right side are similar and pressing `F3` (or `3`), they can be aligned.\nThis is done block by block in standard configuration, which means that bytes near the cursor are aligned first and further aligned blocks are displayed later on both sides.\n\nIt is also possible to do global alignment (of the whole files at once) by changing the settings using `F4` (be sure to consult the help on the parameters).\nGenerally, since it takes quadratic time and space, the global alignment will not work well for files bigger than 64kB.\nThere is also a \"banded\" algorithm which is faster, but slightly less accurate.\n\nYou can also select a region on one file and by pressing F3 the aligning algorithm will do a semiglobal alignment using the selected bytes as a pattern to find the corresponding bytes on the other file.\n\nIt is also possible to print the diff directly to the terminal by using `biodiff --print file_a file_b`.\nIn that case (if the files are small enough for it not to take too long), you can add the `-gglobal` flag to do a global alignment (as opposed to a blockwise one, which is better suited for interactive use).\n\nInstallation\n------------\nIf you're lucky, there will be a package available in your primary package manager, see the [repology page](https://repology.org/project/biodiff/versions).\nThere should be downloadable binary files for some environments under the [releases page](https://github.com/8051Enthusiast/biodiff/releases).\nAlternatively, you can also install this using `cargo` by doing `cargo install biodiff`.\nYou will need cmake installed for the `wfa2` feature to compile.\nNote that in case you use Windows, you need to use the `x86_64-unknown-linux-gnu` target if you want to have `wfa2` support.\n\nYou can also execute directly using code from this repository by executing `cargo run --release -- file_a file_b`.\nNote that configuration files are only guaranteed to stay compatible between tagged releases.\n\nBy default, settings are stored in a [platform-specific user directory](https://github.com/dirs-dev/dirs-rs#Features).\nTo use a custom settings directory, set the `BIODIFF_CONFIG_DIR` environment variable to the desired directory path before running `biodiff`.\nIf the directory doesn't exist, it will be automatically created.\n\nLicense\n-------\nThis project is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8051Enthusiast%2Fbiodiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F8051Enthusiast%2Fbiodiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8051Enthusiast%2Fbiodiff/lists"}