Skip to content

Instantly share code, notes, and snippets.

@gerep
Forked from scalone/cut_the_hope.rb
Last active Aug 29, 2015
Embed
What would you like to do?
f = IO.binread("avatar.gif")
@parts = []
f.each_char.each_slice(10000).each do |s|
@parts << s.join
end
@text = ""
@parts.each { |chunk| @text << chunk }
IO.write("avatar2.gif", @text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment