Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gobindiff

A simple multi-platform tool to display two files in hexadecimal and highlight their differences.

gobindiff is heavily inspired by vbindiff, and it aims to be a drop-in replacement.

Powered by tcell.

gobindiff screenshot

Install

Install with Go SDK

  1. Install Golang from your favourite package manager.
  2. Invoke go install github.com/xeeynamo/gobindiff@latest

Install from source

git clone https://github.com/Xeeynamo/gobindiff.git
cd gobindiff
make install

Override vbindiff

If you want to temporarily replace vbindiff with gobindiff on Linux, create a sym-link:

sudo ln -s $(which gobindiff) /usr/local/bin/vbindiff

To uninstall, remove the sym-link:

sudo rm /usr/local/bin/vbindiff

Features

  • Support for files bigger than 4GB
  • Small footprint (less than 3.0MB executable, 11MB memory usage when comparing >20GB files)
  • Neutral colors that work on any terminal color scheme
  • Reactive and resizable UI
  • Multiple navigation keys
  • Differ between multiple files

Keymap

  • ESC or Q: exit from gobindiff
  • Directional buttons: move columns and rows by a single unit
  • Page Up/Down: move by a page
  • Home or T: move to the top of the file(s)
  • End or B: move to the bottom of the file(s)
  • Enter: move to the next diff
  • ALT+Enter: move to the previous diff
  • +: display one more byte column
  • -: display one less byte column
  • 0: reset byte columns to fit the width of the window
  • 1: do not group bytes
  • 2: group every two bytes
  • 3: group every three bytes
  • 4: group every four bytes
  • A: toggle ASCII view
  • O: toggle offset view

Settings

hide_offsets

Hides the offset column on the left-hand side. Same effect as toggling it with 'O'.

Default: false

hide_ascii

Hides the ASCII column on the right-hand side. Same effect as toggling it with 'A'.

Default: false

bytes_per_row

How many bytes are displayed per row. Same effect as changing it with '0', '+' or '-'. A value of zero will fill the terminal width.

Default: 16

byte_group

Group multiple bytes before separating them with a space. Same effect as changing it with '1', '2', '3' or '4'.

Default: 1

# Linux settings path
~/.config/gobindiff/gobindiff.conf

# macOS settings path
~/Library/Application\ Support/gobindiff/gobindiff.conf

# Windows settings path
%APPDATA%\gobindiff\gobindiff.conf

# example of a configuration file
hide_offsets=false
hide_ascii=false
bytes_per_row=16
byte_group=1

Planned Features

  • Go-to offset not implemented
  • Optional different colors whenever the bytes are higher or lower
  • Animation to better highlight different bytes at glance
  • Set accent color other than red
  • Set foreground color
  • Set background color

Contribute

Use go run . FILE1 [FILE2]... to quickly iterate between changes. make install will install a development copy of gobindiff. make cross will generate the cross-platform binaries.

About

highlight differences between binary files

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages