Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Huffman Encoding in ruby for shits and giggles
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md add to readme
huffman.rb redesigned interface

README.md

Huffman Encoding in Ruby

    require 'huffman.rb'

    puts encoding = "Hello Huff".huffman

1101010000100010110011111111

    encoding.lookup.each do |code, char|
      puts "#{code} : #{char}"
    end

00 : l 010 :
110 : H 011 : u 111 : f 100 : o 101 : e

Unit tests coming soon...

Something went wrong with that request. Please try again.