lib/gziprb/huffman.rb
def from_encoding(encoding)
        Tree.empty.tap do |tree|
          encoding.each do |lit, code|
            insert_code(tree, code, lit)
          end
        end
      end
# Creates a Tree from a mapping of literal to codes. Does not check for uniqueness of either
# codes or literals.
Creates a Tree from a mapping of literal to codes. Does not check for uniqueness of either
codes or literals.
Creates a Tree from a mapping of literal to codes . Does not check for uniqueness of either codes or literals .
def from_encoding(encoding)
        Tree.empty.tap do |tree|
          encoding.each do |lit, code|
            insert_code(tree, code, lit)
          end
        end
      end
def from_encoding ( encoding ) Tree . empty . tap do | tree | encoding . each do | lit , code | insert_code ( tree , code , lit ) end end end
Creates a Tree from a mapping of literal to codes.
Creates a Tree from a mapping of literal to codes .
encoding