Project

bitter

0.0
No commit activity in last 3 years
No release in over 3 years
Represent binary data using English words
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.3
>= 0
~> 2.14
 Project Readme

Bitter

Build Status

Convert binary data to English gibberish using a dictionary of 2^16 words.

A normal 128-bit number can be encoded in hexidecimal as:

aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

This is pretty tough to copy by hand. Why not use English? Bitter takes the same 128-bit number and encodes it as:

ponce scarlet successive toughened streamlines
superlative deng compressor pried dominions

The word list is available in words.txt.

Installation

Add this line to your application's Gemfile:

gem 'bitter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bitter

Usage

You can encode and decode strings of bytes using Bitter.encode and Bitter.decode.

require 'bitter'
puts Bitter.encode File.new('pic.jpg').read

Bitter also works from the command line:

$ echo "Hello world" | bitter
electronically humblest impair

$ bitter myphoto.jpg > myphoto.jpg.txt
$ bitter --decode myphoto.jpg.txt > myphoto2.jpg
$ diff myphoto.jpg myphoto2.jpg