Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 112 lines (103 sloc) 5.45 KB
#!/usr/bin/perl
my @lines = <DATA>;
for my $line ( @lines ) {
chomp $line;
print encode_line( $line ), "\n";
}
sub encode_line {
my $s = shift;
my $out = '';
while ( $s =~ /(.)\1*/g ) {
$out .= $1 . chr(32+length($&));
}
return $out;
}
__DATA__
?IIIIIII7II?????+
~III777II777I?+==++==+:
???I7I???I7II++=====++===
??+??????????+===~~=+++??==+
??+??II??????+==~=~~=+++++==++
I+?????????+?+====~=~==+==++?==?
?????II?????+++++=======?===~~~~==
,?????II????????++++====~===::~~~~:~
I?I??II?+++??+?+++==~~~~:~:~:,:,,:::~
I??????+==+???++++=~~:~:~:,:::,:,,,,,::
+I?++++=+=+????+++=~~:~~:::,,,,::,,,:,:
I??+?+====+???+++===~~::::,::,:,,,,,,::
I????=~===++?+=+=~==~:~~:,,,,,,,.,,,,,:~
=??+?=~~~~??+?+===~~==,==~~~~,,,,..,,,.:=
II++==~~=++++++=~~=~,~+=?+?=I?++=..,.,,:
IIII?+?=====+~+++~=~~~:::=~+~===:,,,,,.,.::
I?=?I+??+=~=~?I?=+=~~~::,~~=~::~=::,,,,,,:: ---------------
?+I??++=++~,::+++~~~:::,,=~~=,~,..,::.: / It's a grep! /
++=+?++~=:~::I+,~=:~,:,,,,:~~......::~,,, ---------------
~=~=:.++~:,.,~=::::.,,:,.:~,:=...==~,:: /
=~?++??+=~~,.:?~.:,:,,,.,::,,~:=~=::,~ /
++~~:~===~:~,.~::,~=~.:,..,:,,:==:.,:7 /
~~,::...:=:,::+:~:.,~,...,.,,,,::~,,::~= /
=~===+=~~,.::,,,:::,..,,,,,,,,,,,:,..,=+?
~=~=~::~~~::,.,,,~:.+,..,,,,..,,,,...,+I?
~==~:~~:~~,~=~~:,:~,:,,,,,,....,,,..+?I?I
~=~=+,:~:=,:~~~~~~::::,.,,.,,.,,,..~+????I
~=~==~=:~~:,~~~~~:::,::,.,,,..,,,I77I?+??II
+I7:::~~=~:,::~~~~.=.,~,,,,...,~7III?+??II7
777?+~:=~=~~:,::~~:::.,,,,,,,,,777II??I777777
777I==:=~::~~~~::~:::,:,:~:::,777I???777777777
7777+,~===~:~:~~~~:::,.~:=,,:777II???77777777777=?
777I~,~~~=~::~:,:,,,:=~~,,:7777I???I7777777777+=++
I7777I,,:,.==::::,:,,,,::::7777I+??I77777777777??I7I7,
,77777I::,..~~:,,,,,,.,:~I7777I+??I777777777777?I7777777,
77777777,...~~:,,,,,.,77777I7???II777777777777+?7777777777
77777777777:,~~~,,=7777777I???II777777777777777+77777777777
77777777777777777777777I+7?7II77777777777777777+777777777777
,,,?~+++????
?IIIIIIIIIIIII????+?++
IIII777II?I7777I?+===+++===+
?I??I77IIII?I777II+?++========~=+
?????IIII????IIII??++=~====+++====++
??++++?I??????????+=+~=~~=~=+?++?I+==+
???++++??I???I??+?+==~~~~==~=+?+++++==?+
??+??????I?I???+++=~=====~~===++++++++=~+
I?+?????III???++?+++====~~======+====+~===?
??????IIII????+?++++++==========?====~~~~~~==
?I??????III??+???+++?++++==+===~~=~~=~~~~~~~:~~=
II??I???III?+++?++++?++++++====~~~~~:::::::::::~~,
?I?I????I?+++++?++?+++++=~~~~~~~::~:::::,:::,:::~+
I??I?????+===+?+??????+=~~=~:~~~~:,,:,:,,:,,,,,,,:~
I??I?++?+====+?????+?++==~~~:~~~~::,,,,,,,:,,,,,,::~
:I?I+??+++===++?++??+++===~~~~:::::::,,,:,,,,,,,,,::~
?I?????+=====+++??++++~===~~~:::::::,,:,,,,,,,,,,,::~
II??+?+=~~=~=+++?+++?+==~==~~:~:::::,,,.,,,,,,,,,,,:~=
=???+?+=~~~~~+?+++?+====~~===:,===~~~~:,,.,,..,,,,,,:~
???++?+==~~==++????==~~~~==~,:+~=++?I?=?+~.:,,....,,:~
?I?I?+?=~=====+++++++==~=~~,:::+=?=?+~I+?+==~~:.,..,,,:+
I?=?II++++=====++~?+===~+==,~:~::+=+=~=~:=:,,::,,...,,,,:
I+?+II++??++====,????=++=:::~:==::==~=~=:=:=~::,::,,,,:::
??+I??+++++++~~:+=+?+====~:~:::=,~:~~~~,=:,..,:::,:...,
++??+?+++=++~:~=~::~~=~:~=,:,::~,~~~~:=:......::::,
+?~=?++++~~,.~:,:~I~,~~:~~,::,:,,.:~,~........::~:,,,,
~+~==:.:+?~:::..,~~~::::::,,,,,,.::~,~+.....=~=~,:,,
:~:+?I?+?+==:~,..,~=~,::::,,,,:,.,::::,,..:~=~::,::
=~=+?===?++=~:~:..~?:~,,:~~,,,,.,.,:,,,::=~~~:,.:=
=?=~,,,:~===~::::..=:=,,~==,.,,,,,.,::,.,==~,.:::+??,
~,.::,,...,~=::,::,::==...~:,.,,.,,.,,,,,::~~,,::,~==
++=~===~~=~:..,::,,,,,,::::~.,.,,...,,,:,,,,,,,,,.,:~=+
==~~=~=~:::~::,..::::::::,:.,.,,,..,..,,,::,.,....:=+?
=~=~~~::::~~:~~~:::.......,~:,,,.,,,,,...,,,,....,+?III
=~==~~:~,,~~:~:~===~::::::::,,,,,,,,.....,,,,,..~?IIIII
,=~~~,,,:=~:+,:~~==~~~~~~:::,,,,....,.,,.,,,...~++?????7
+~==~:~~:==~=~~:::~~~~~~~~::::,,.,,.,.,,.,,,,:III??+???I=
,?=+~~=~=::~~:,,:~~~:~:::~:.,:,,,,,,,,,.,,,,77III??+??II7=
,??7=~~~:~:~~~,,:::~~~~~~,~.,:,,,,,,,...,:III7I??+??IIII77
~I7I++~::~+~=~~::,::::~~:~,~.::,:,,,,,,,,+777III???I7777777I
:777?7??=:=+~:~=~~:~::::,:~::.,~.:::,~~,:I777II????77777777777
77777I===:~=~:~~~~:~~:~~~:~::~,~,:~:,:,:7777II????7777777777777?
7777I+::~====~~:~:::~~~::::,,.,,,=,:::7777II????I77777777777777++?
~7777I~,:~=~+==~~~~:::,,,,,:=~~~~::,:77777I?I???777777777777777~+~+?
777777?:,:::+~+~:::::,,:,:::::,,::::7777III????I77777777777777+???=:I
7777777+:,:~,..==~,::,:,,,:~:,,,::?77777II+I??I777777777777777+?I777777=,
77777777I:::,..:~~:,,,:,,,,,..::+777777II+????7777777777777777+?7777777777I
7777777777I,,...~~~:,,,..,,,,.~777777II??I??I77777777777777777??7777777777777
=777777777777+..,~=~:,,,,,:?7777777III+???IIII77777777777777777+I77777777777777
777777777777777777777777777777777II+I??I77777777777777777777777+7777777777777777