Skip to content

Instantly share code, notes, and snippets.

zndris

Block or report user

Report or block zndris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zndris
zndris / compress.rb
Last active Dec 22, 2015
Primitive example for compressing text
View compress.rb
module Compress
def self.compress(text)
chars = chars_by_frequency text
map = charmap chars
bits = ''
text.each_char do |char|
bits << map[char]
end
You can’t perform that action at this time.