GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chgans/bsdiff: A tool to diff bitstream files

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Si8600AC-B-IS.bxl
Si8600AC-B-IS.bxl
 
 
Si8600AD-B-IS.bxl
Si8600AD-B-IS.bxl
 
 
Si8602AC-B-IS.bxl
Si8602AC-B-IS.bxl
 
 
Si8602AD-B-IS.bxl
Si8602AD-B-IS.bxl
 
 
Si8605AC-B-IS1.bxl
Si8605AC-B-IS1.bxl
 
 
Si8606AC-B-IS1.bxl
Si8606AC-B-IS1.bxl
 
 
Si8606AC-B-IS1.bxl.1
Si8606AC-B-IS1.bxl.1
 
 
Si8606AD-B-IS.bxl
Si8606AD-B-IS.bxl
 
 
bindiff.pro
bindiff.pro
 
 
main.cpp
main.cpp
 
 
mainwindow.cpp
mainwindow.cpp
 
 
mainwindow.h
mainwindow.h
 
 
mainwindow.ui
mainwindow.ui
 
 

Repository files navigation

bsdiff

An experimental tool to diff bitstream files

I'm trying to reverse engineer some proprietary binary files, and I noticed that these files are bit streams (as opposed to byte stream).

My approach is to compare two files that have minimal diferrence and see how the bitstream behave, I need to be able to detect bit flips as well as bit insertion/deletion between two files.

This is a very beta version of such a tool, it attempts to mimic the unix diff tool, but display bits instead of text.

For now, the algorithm is very stupid and simple, it doesn't yet understand the concept of context as used in GNU diff and patch.

I might improve this tool to fit my needs.

Example output

In the example below, you can see that at position 0, the first file contains 1100 where as the second file contains 0010.

Then the files are identical up to the 144975'th bit. At this bit position, the first file contains 110 whereas the second one contains 01100, that is the second file as 2 more bits that the first one.

The two files have then roughly 10k identical bits, after which there a new difference 110 vs 011010110, ...

As you might have noticed, this tool is able to track bit assertion and removal.

$ bsdiff Si8605AC-B-IS1.bxl Si8606AC-B-IS1.bxl
--- Si8605AC-B-IS1.bxl
+++ Si8606AC-B-IS1.bxl
@@ [4,0] -4,-4 +4,4 @@
-1100
+0010
 ^^^
@@ [3,2] -144975,-3 +144975,5 @@
-  110
+01100
 ^^ ^
@@ [3,6] -152419,-3 +152421,9 @@
-      110
+011010110
 ^^^^^^
@@ [2,0] -154292,-2 +154300,2 @@
-11
+01
 ^
...

Sample files

https://www.silabs.com/products/power/isolators/Pages/Si86xx-Digital-Isolators.aspx

About

A tool to diff bitstream files

Resources

Readme
GPL-2.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.