def crunch(ascii)
  bitstring = ascii.bytes.collect {|b|  % b}.join
  [bitstring].pack()
end

def expand(binary)
  bitstring = binary.unpack()[0]
  bitstring.scan(/[01]{7}/).collect {|b| b.to_i(2).chr}.join
end

original = 
puts 

filename = 


File.open(filename, ) do |fh|
  fh.binmode
  fh.print crunch(original)
end

filesize = File.size(filename)
puts 


expanded = File.open(filename, ) do |fh| 
  fh.binmode
  expand(fh.read)
end

if original == expanded
  puts 
else
  puts 
end