16
\$\begingroup\$

With this challenge we pay homage to everyone around the whole world fighting against the coronavirus crisis; particularly represented are the people tied to medicine, as the Rod of Asclepius is a symbol associated with medicine and health care.

For that matter, we resort to some ASCII art found at asciiart.eu (wrongfully) listed under the ASCII art associated with the Rod of Caduceus.

Task

Your task is to print or return the following modified art of an original by Juergen Jakubowski:

 LLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLL LLL LLLLLLLLLLLLLLLLLLL LLL LLLLLLL LLLLLLLLLLLLLLLLLLL LLLLLLL LLLLLLLLLL LLLLLLLLL LLLLLLLL LLLLLLLLLL LLLLLLLLLLLLL LLLLLLLLL LLLL LLLLLLLLLLLLL LLLLLLLLLLLLLLLLL LLLLL L LL LLLL LLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLL LLL LL LLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLL LLLLLL LLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLL LLLL LLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLL LLL LLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLL L LLLLLLLLLLLLL LLLLLLLLLLLLLLLL LL L LLLLLLLLLLLL LLLLLLLLLLLLLLLLLLL LL L LLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL LLL LLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL L LLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLL LLLLLL L LLLLLLL LLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLL LLLLLL LLLLLLLLL LLLLLLLLLLLLLLL LLLLLLLLLLLL LLLLLLL LLLLLLL LLLLLLLLLLLL LLLLLLLL LLLLLLLLL LLLLL LLLLLLLL LLLLL LLLLLLLLLLL LLLLLL LLLLL LL LLLLLLLLLLLLLLLLLLL LL LLLLLLLLLL LLLLLLLL LLLLLLLLLL LLLLLLLL LLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLL LLLLLLLLLLLLLLLLLLL 

This art has been made more symmetrical, non-L characters have been replaced by Ls and the author name and e-mail have been removed from the art.

You may add/remove leading/trailing whitespace as long as the layout of the Ls and the whitespace within them doesn't change.


This is so shortest submission in bytes, wins! If you liked this challenge, consider upvoting it! If you dislike this challenge, please give me your feedback. Happy golfing!

\$\endgroup\$
2
  • 2
    \$\begingroup\$ AKA: "Find the Best Compression Algorithm" \$\endgroup\$ Commented May 5, 2020 at 13:13
  • \$\begingroup\$ I am really quite tired of ascii-art + kolmogorov-complexity, it has been done a thousand times and they are quite practically all the same challenge. \$\endgroup\$ Commented May 7, 2020 at 0:48

14 Answers 14

6
\$\begingroup\$

Python 3.8 (pre-release), 304 291 288 284 bytes

-2 bytes thanks to xnor.

i=k=0 for c in b"b!FjnuaV5k6[ZvtUk]-M81/DoW(3D|I]wB$j;D0mR' |tBjimp?$NAWR5N^21ZLk#sqG:GRQcBXMAgSYaZL\:%El2:=T{Kw%o,pd3Tav[pM$-&pN|jVdYlavl^;8E?zI\"PQ5:%A>yHa:7^) ,LX~3RH^bG;dGg.2{xsqLW5o":i=i*100+c-27 s='' while~i+k:c=i%37;i//=37;s+=' L'[k]*c;k^=1;c or print(f'{s:^71}'+(s:='')) 

Try it online!

Since the string contains some unprintables, here is a hexdump:

00000000: 6221 466a 6e75 6156 351d 6b36 5b5a 1b76 b!FjnuaV5.k6[Z.v 00000010: 7455 6b5d 2d4d 3831 2f44 6f57 2833 447c tUk]-M81/DoW(3D| 00000020: 495d 7742 246a 3b44 306d 5227 207c 7442 I]wB$j;D0mR' |tB 00000030: 6a69 6d70 3f24 4e41 5752 354e 5e32 311f jimp?$NAWR5N^21. 00000040: 5a4c 6b23 7371 473a 4752 5163 421e 584d ZLk#sqG:GRQcB.XM 00000050: 4167 5359 615a 4c5c 3a25 456c 323a 3d54 AgSYaZL\:%El2:=T 00000060: 7b4b 7725 6f2c 7064 3354 6176 5b70 4d24 {Kw%o,pd3Tav[pM$ 00000070: 1e2d 2670 4e7c 6a56 6459 6c61 766c 5e3b .-&pN|jVdYlavl^; 00000080: 3845 3f7a 4922 5051 353a 2541 3e79 4861 8E?zI"PQ5:%A>yHa 00000090: 3a37 5e29 1f20 2c4c 587e 3352 485e 6247 :7^). ,LX~3RH^bG 000000a0: 3b64 4767 2e32 7b78 7371 4c57 356f ;dGg.2{xsqLW5o 
\$\endgroup\$
4
  • \$\begingroup\$ Your snake seems to have gotten mirrored. \$\endgroup\$ Commented May 4, 2020 at 8:42
  • \$\begingroup\$ @xnor fixed it, base conversion is dangerous ;). \$\endgroup\$ Commented May 4, 2020 at 8:49
  • 1
    \$\begingroup\$ Yeah, base notation really should start with the least significant digit :) It looks like your i*=94;i+=c-32 can be i=i*94+c-32. \$\endgroup\$ Commented May 4, 2020 at 9:04
  • \$\begingroup\$ @xnor thanks a lot \$\endgroup\$ Commented May 4, 2020 at 9:08
5
\$\begingroup\$

Python 3, 325 ... 276 273 260 bytes

s="";i=0 for n in b"_____)393O-090S0-/(.-V3+/,*+Y7(+''((**(]=))((*b=,,(d=*/(e>+*+gA.nC0jC/eC-aC,\<()+Y:*'+Y6(()')X9)((''_;,d?-eC.fH-hJ*gF'))fE)'(fA,h8',)'(-'^5*,*/*[2,-+-,X.//++/T+21(,2Q(494N0'T0'T___": s+=n%38*"L "[i];i^=1 if n>75:print(f"{s:^71}");s="";i=0 

Try it online!

How:

The big idea is to encode each line as a list of integer, each denotes the number of consecutive "L" or " " characters. For example, [1, 2, 3] denotes L LLL (1 L, 2 spaces, 3 L).

Each list of integer can be further encoded as a byte-string (Python3 byte string acts similarly to a list of code points). The run lengths are between 1 and 36, most of which are unprintable ASCII code points. Thus, I map each integer i to i+38 instead. The above example would maps to:

"L LLL" -> [1,2,3] -> [39,40,41] -> "'()" 

(38 is chosen instead of 37 because it prevents a backslash character \ that needs to be escaped).

The new line character can be sneaked into a sequence by adding an extra 38 to the end of each line.

"L LLL\n" -> [39,40,41] -> [39,40,79] -> "'(O" 

In summary: for each code point n in the byte string, n%38 gives the length of the current run, and n>=76 if the current run is the end of a line.

I use Neil's idea of only compressing the left two thirds of each line, then mirror the rest to save more characters.

I additionally exploit the symmetry of the shape by ignoring the spaces on both side of each line. When decoding, I center align each line in a block of width 71. (This idea is the same as ovs's approach, though I came up with it independently).

\$\endgroup\$
3
  • 1
    \$\begingroup\$ It looks like the challenge allows getting rid of the empty columns of spaces on the left and right. Might that save you some bytes? \$\endgroup\$ Commented May 4, 2020 at 8:30
  • \$\begingroup\$ @xnor It doesn't look like it, he could probably vary the number of padding spaces by about 10 or so without affecting the length of his code. \$\endgroup\$ Commented May 4, 2020 at 11:56
  • \$\begingroup\$ @Neil it seems like centering method has less number of runs than mirroring 1/3. \$\endgroup\$ Commented May 4, 2020 at 12:35
5
\$\begingroup\$

05AB1E, 170 bytes

-9 bytes thanks to @mypronounismonicareinstate.

-1 byte thanks to @KevinCruijssen.

•2yÂ6:å₂øǝ₄²¤ΩàΘ₄IüÊX¹åêøë®Ñ¼(á׿ìŒΓÉnγΘi‰—θвƶ\`α\ǝ)t~óÌ dHD{iÍ;½vŽć·µ°Ãô-©ã„jΛ":иdC{!hâ'gÊć'Ž?«*9¢h¬βÉšGƶ¿Ć9₄>G>„FèQäªj'₂¿TNt …ΣSjδ!¯„мŸ>₅&¯!E-&&Wž™è°‹aтćËà•₆в„ LÞ×J69ô» 

Try it online!

Explanation

•...• Gigantic packed integer-list of run-lengths 37в Convert it from base 37 „ L Length-2 string " L" Þ Extend to the length of the other operand × Multiply them J Join the output string 69ô Split into chunks of length 69 » Join by newlines 
\$\endgroup\$
2
  • 1
    \$\begingroup\$ 171 bytes by using the base and the number from my program (because this uses the exact same algorithm): Try it online! \$\endgroup\$ Commented May 4, 2020 at 11:34
  • 1
    \$\begingroup\$ 170 bytes by changing the ...,36,... to ...,1,0,35,... in the compressed integer-list, so the 1-byte builtin (36) can be used instead of 37. \$\endgroup\$ Commented May 6, 2020 at 9:48
3
\$\begingroup\$

Python 3, 341 bytes

for c in b'[S [S [S [S [S KCMSMC JGJSJG JJGIBHGJ IMEIFDEM HQBEAABBDDBQ GWCCBBDV FWFFBX EWDIBY DXEDE[ B[Hb B]J^ E]IY H]GU K]FP NVBCEM OTDAEM QPBBCACL MSCBBAAS KUFX HYGY E]HZ BbG\\ CdD[ D`ACCZ E_CABZ F[F\\ HRAFCABGAR HODFDIDO ILFGEGFL JHIIEEIH JELKBFLE KBNSNB [JAH [JAH [S [S [S'.split():print(''.join(' L'[i%2]*(j-64)for i,j in enumerate(c))) 

Try it online!

Basic run-length encoding

\$\endgroup\$
2
  • \$\begingroup\$ looks like we arrive at the same approach :) \$\endgroup\$ Commented May 4, 2020 at 8:03
  • \$\begingroup\$ @SurculoseSputum certainly does! \$\endgroup\$ Commented May 4, 2020 at 8:03
3
\$\begingroup\$

Bubblegum, 202 bytes

Uses the file with all unnecessary leading and trailing whitespace removed. Since the code is a raw DEFLATE stream, here's a hex dump (not that it helps significantly):

00000000: d596 410a 4331 0805 f739 8507 eafd cf53 ..A.C1...9.....S 00000010: 0882 30e2 2059 b559 257d ce53 acc2 8fe9 ..0. Y.Y%}.S.... 00000020: 7cfa 39ff 195c a207 77fd 2076 0933 758b |.9..\..w. v.3u. 00000030: a977 7405 74cf 0137 fe9e 3868 648c 7b29 .wt.t..7..8hd.{) 00000040: bcf7 0d38 cb48 6a0e 3aca 9788 2038 0c12 ...8.Hj.:... 8.. 00000050: 9b28 1693 24bd 8387 6832 0e7b 171b 2c6f .(..$...h2.{..,o 00000060: 8918 a9c5 d2c5 f89d 85ae ee04 da3c 0365 .............<.e 00000070: 4607 4b44 be24 89f9 b25f 141a d07d 6708 F.KD.$..._...}g. 00000080: efff 9ad7 09d9 8faa 5521 2e54 7d91 657f ........U!.T}.e. 00000090: fde4 b8bc ef4c f26e e11e 8b6e 4c21 810a .....L.n...nL!.. 000000a0: eec3 78e6 c50d 0ff0 3156 8dfb b40d c5d2 ..x.....1V...... 000000b0: b05e d440 0fcb 980f c858 27ae 320f 0276 .^[email protected]'.2..v 000000c0: df0a acd3 837f edfb e60b .......... 

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Jelly, 186 175 174 bytes

“ç⁺lñỊɓ¡ḌỌKḃßƇ[Æ÷ịœi#⁵Q#^Fo$Q$'ẠKẏȤ⁴ịɲɦʋỌ⁷ḄLqẏ⁺nÄẉ⁾ṀⱮsọḢɲlọȮḄṡ-$ɓv?KggjḞƭCid/ Ȥx?ßɓṇȯ¢ḋ®ṖIQṁ"œıṚ/£;ẉ*ȧ%¹ȯḷŻṖ4eS⁸w÷ƭʋịṢḤUKGɦðþḥ³-_?ß§lÇĠⱮkĠƝẎ3UỌYBTẋŒØL®œƇỊ⁼Ẓd’b37⁶”L2ƭx$€Fs69Y 

The part at the end can almost certainly be golfed, as I'm relatively bad at Jelly. Certain very long run lengths are replaced by shorter ones and a zero in the integer (e.g. [..., 63, ...] is changed to [..., 32, 0, 31, ...]).

Explanation:

“...Ẓd’ very large integer b37 decode into base 37 digits ⁶”L2ƭ magically alternate between spaces and Ls x$€ those characters repeated each element times Fs69Y flatten, split into 69-long slices and join by newline 

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ Save a byte by using base 35 (changing the one 36 to 2,0,34). Save another two by using modulo indexing (⁶”L2ƭx$€F -> Jx$ị⁾ L). TIO \$\endgroup\$ Commented May 4, 2020 at 12:09
  • \$\begingroup\$ Nice. I tried to get modular indexing to work, but it was too long. How does the Jx$ part work, though? \$\endgroup\$ Commented May 4, 2020 at 12:29
  • 1
    \$\begingroup\$ $ treats the two links (in this case atoms) to the left as if it were a monadic chain, so it's a function which accepts the list of integers (call this a), gets the 1-indexed indices (J) and then performs repetition (x) vectorised across a. (e.g. if the big list of digts were a = [4,1,2] then this would do x(J([4,1,2]),[4,1,2]) = x([1,2,3],[4,1,2]) = [1,1,1,1,2,3,3]) \$\endgroup\$ Commented May 4, 2020 at 17:57
2
\$\begingroup\$

Charcoal, 167 bytes

”}∨|Sλχ6?↗⊕H4R¬.Y3nLïB⁷ζ↧*⟧﹪∨?F⬤SYηT⌊…δⅈJK´u&⸿ZÀec⎚υιw↙SkêX⁼E³ZGςδ=⪫s{εηB(⊘{⁷,W∧⸿ηSBiYγ\>tI;~↓EjZ0⪫|∨_D?YT⟧?↘JIψ∨;2≔↑⁵C⊕W⦄M↓|⮌κ¬Qb›b{″FJHo??◨χcμχ‴Z⁷ⅈ5Oν⭆.¶◨D3e]”‖OO←¹⁹ 

Try it online! Link is to verbose version of code. Explanation: The compressed string literal encodes the right two thirds of the output and then the right third is reflected to complete the image.

If the image was more vertically symmetric then it might have been possible to save a few more bytes.

\$\endgroup\$
1
  • \$\begingroup\$ Wow. This is magic. \$\endgroup\$ Commented May 4, 2020 at 10:51
2
\$\begingroup\$

Retina, 290 285 bytes

 19¶19¶19¶19¶19¶3je19¶7jb19¶10h9c8¶13f9g4¶17c5b1c2e4¶23d3c2e2¶23g6c3¶23e9c3¶24f4f4¶27i9¶29jb5¶29j3¶29h2¶29g¶22c3f¶20e1f1¶16c2d1d2¶19d2c1b5¶21g8¶25h6¶29i4¶34h3¶36e3¶32b3d3¶31d1c4¶27g7¶18b6d1c7¶15e6e9¶12g7f7¶8j9f5¶5jd11c6¶2jf19¶10b8¶10b8¶19¶19¶19 \d+ *L T`l`d \d *  P^`.+ %`.{19}$ $&$^$` 

Try it online! Edit: Saved 4 bytes by encoding the left two thirds instead of the right two thirds. Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first line simply inserts the encoded data.

\d+ *L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d * 

Run-length decode the digits to spaces (each digit decoded separately).

P^`.+ 

Left-pad all of the lines to the same length. Annoyingly the P command (unlike, say, the O command) does not have a useful default, which might save 2 bytes here.

%`.{19}$ 

Match the last 19 characters on each line.

$&$^$` 

Append their reversed prefixes, thus mirroring the output.

\$\endgroup\$
2
\$\begingroup\$

JavaScript (ES6),  315 308  305 bytes

Saved 3 bytes thanks to @ASCII-only

The data string is only 163 bytes long, which is pretty good. But the decompression code is too verbose.

_=>`jJJJJ 3dj 7ajA7928D5964H25112244N332242N6623N4923O5454R89Ta5T93T72T6M235K4151G223132J322115L68P76T84Y73Z0143W1333V3124R67I163127F4649C6757 89955 5cb26 2ejA18A18JJJ`[R='replace'](/[A-Z]/g,` $&`)[R](/.+/g,s=>(s=s[R](k=/./g,x=>' L'[k^=1].repeat(parseInt(x,36))).padStart(45))+(g=k=>k--?s[k]+g(k):'')(26)) 

Try it online!

Decompression

We first insert a line-feed before each letter in upper case. For instance, 7ajA7928D5964H25112244 is turned into:

7aj A7928 D5964 H25112244 

For a given line, we convert each character from base 36 to decimal:

"D5964" ~> [ 13, 5, 9, 6, 4 ] 

For each value \$n\$ in this list, we generate a string of \$n\$ characters, alternating between "L" and " ":

[ 13, 5, 9, 6, 4 ] ~> "LLLLLLLLLLLLL LLLLLLLLL LLLL" 

We insert as many leading spaces as necessary to reach 45 characters and append the first 26 characters at the end in reverse order:

 <-------------------- 45 -------------------> " LLLLLLLLLLLLL LLLLLLLLL LLLL" " LLLLLLLLLLLLL LLLLLLLLL LLLL LLLLLLLLLLLLL " <---------- 26 ----------> <---------- 26 ----------> 
\$\endgroup\$
2
2
\$\begingroup\$

Deadfish~, 5802 bytes

{i}{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{{i}dddddd}iiiiccc{{d}iiiiii}dddd{c}ccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}ccc{{i}dddddd}iiiiccc{{d}iiiiii}dddd{c}{d}{d}ddc{i}{i}iiccccccccc{{i}dddddd}iiiiccccccc{{d}iiiiii}dddd{c}{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{{i}dddddd}iiiiccccccc{{d}iiiiii}ddddccccccccc{d}{d}ddc{i}{i}iiccccccccc{{i}dddddd}iiii{c}{{d}iiiiii}ddddccccccc{{i}dddddd}iiiiccccccccc{{d}iiiiii}ddddcc{{i}dddddd}iiiicccccccc{{d}iiiiii}ddddccccccc{{i}dddddd}iiii{c}{{d}iiiiii}ddddccccccccc{d}{d}ddc{i}{i}iicccccccc{{i}dddddd}iiii{c}ccc{{d}iiiiii}ddddccccc{{i}dddddd}iiiiccccccccc{{d}iiiiii}ddddcccccc{{i}dddddd}iiiicccc{{d}iiiiii}ddddccccc{{i}dddddd}iiii{c}ccc{{d}iiiiii}ddddcccccccc{d}{d}ddc{i}{i}iiccccccc{{i}dddddd}iiii{c}ccccccc{{d}iiiiii}ddddcc{{i}dddddd}iiiiccccc{{d}iiiiii}ddddc{{i}dddddd}iiiic{{d}iiiiii}ddddcc{{i}dddddd}iiiicc{{d}iiiiii}ddddcccc{{i}dddddd}iiiicccc{{d}iiiiii}ddddcc{{i}dddddd}iiii{c}ccccccc{{d}iiiiii}ddddccccccc{d}{d}ddc{i}{i}iicccccc{{i}dddddd}iiii{c}{c}ccc{{d}iiiiii}ddddccc{{i}dddddd}iiiiccc{{d}iiiiii}ddddcc{{i}dddddd}iiiicc{{d}iiiiii}ddddcccc{{i}dddddd}iiii{c}{c}cc{{d}iiiiii}ddddcccccc{d}{d}ddc{i}{i}iiccccc{{i}dddddd}iiii{c}{c}ccc{{d}iiiiii}ddddcccccc{{i}dddddd}iiiicccccc{{d}iiiiii}ddddcc{{i}dddddd}iiii{c}{c}cccc{{d}iiiiii}ddddccccc{d}{d}ddc{i}{i}iicccc{{i}dddddd}iiii{c}{c}ccc{{d}iiiiii}ddddcccc{{i}dddddd}iiiiccccccccc{{d}iiiiii}ddddcc{{i}dddddd}iiii{c}{c}ccccc{{d}iiiiii}ddddcccc{d}{d}ddc{i}{i}iiccc{{i}dddddd}iiii{c}{c}cccc{{d}iiiiii}ddddccccc{{i}dddddd}iiiicccc{{d}iiiiii}ddddccccc{{i}dddddd}iiii{c}{c}ccccccc{{d}iiiiii}ddddccc{d}{d}ddc{i}{i}iic{{i}dddddd}iiii{c}{c}ccccccc{{d}iiiiii}ddddcccccccc{{i}dddddd}iiii{c}{c}{c}cccc{{d}iiiiii}ddddc{d}{d}ddc{i}{i}iic{{i}dddddd}iiii{c}{c}ccccccccc{{d}iiiiii}dddd{c}{{i}dddddd}iiii{c}{c}{c}{{d}iiiiii}ddddc{d}{d}ddc{i}{i}iicccc{{i}dddddd}iiii{c}{c}ccccccccc{{d}iiiiii}ddddccccccccc{{i}dddddd}iiii{c}{c}ccccc{{d}iiiiii}ddddcccc{d}{d}ddc{i}{i}iiccccccc{{i}dddddd}iiii{c}{c}ccccccccc{{d}iiiiii}ddddccccccc{{i}dddddd}iiii{c}{c}c{{d}iiiiii}ddddccccccc{d}{d}ddc{i}{i}ii{c}{{i}dddddd}iiii{c}{c}ccccccccc{{d}iiiiii}ddddcccccc{{i}dddddd}iiii{c}cccccc{{d}iiiiii}dddd{c}{d}{d}ddc{i}{i}ii{c}ccc{{i}dddddd}iiii{c}{c}cc{{d}iiiiii}ddddcc{{i}dddddd}iiiiccc{{d}iiiiii}ddddccccc{{i}dddddd}iiii{c}ccc{{d}iiiiii}dddd{c}ccc{d}{d}ddc{i}{i}ii{c}cccc{{i}dddddd}iiii{c}{c}{{d}iiiiii}ddddcccc{{i}dddddd}iiiic{{d}iiiiii}ddddccccc{{i}dddddd}iiii{c}ccc{{d}iiiiii}dddd{c}cccc{d}{d}ddc{i}{i}ii{c}cccccc{{i}dddddd}iiii{c}cccccc{{d}iiiiii}ddddcc{{i}dddddd}iiiicc{{d}iiiiii}ddddccc{{i}dddddd}iiiic{{d}iiiiii}ddddccc{{i}dddddd}iiii{c}cc{{d}iiiiii}dddd{c}cccccc{d}{d}ddc{i}{i}ii{c}cc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}ddddccc{{i}dddddd}iiiicc{{d}iiiiii}ddddcc{{i}dddddd}iiiic{{d}iiiiii}ddddc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}cc{d}{d}ddc{i}{i}ii{c}{{i}dddddd}iiii{c}{c}c{{d}iiiiii}ddddcccccc{{i}dddddd}iiii{c}{c}cccc{{d}iiiiii}dddd{c}{d}{d}ddc{i}{i}iiccccccc{{i}dddddd}iiii{c}{c}ccccc{{d}iiiiii}ddddccccccc{{i}dddddd}iiii{c}{c}ccccc{{d}iiiiii}ddddccccccc{d}{d}ddc{i}{i}iicccc{{i}dddddd}iiii{c}{c}ccccccccc{{d}iiiiii}ddddcccccccc{{i}dddddd}iiii{c}{c}cccccc{{d}iiiiii}ddddcccc{d}{d}ddc{i}{i}iic{{i}dddddd}iiii{c}{c}{c}cccc{{d}iiiiii}ddddccccccc{{i}dddddd}iiii{c}{c}cccccccc{{d}iiiiii}ddddc{d}{d}ddc{i}{i}iicc{{i}dddddd}iiii{c}{c}{c}cccccc{{d}iiiiii}ddddcccc{{i}dddddd}iiii{c}{c}ccccccc{{d}iiiiii}ddddcc{d}{d}ddc{i}{i}iiccc{{i}dddddd}iiii{c}{c}{c}cc{{d}iiiiii}ddddc{{i}dddddd}iiiiccc{{d}iiiiii}ddddccc{{i}dddddd}iiii{c}{c}cccccc{{d}iiiiii}ddddccc{d}{d}ddc{i}{i}iicccc{{i}dddddd}iiii{c}{c}{c}c{{d}iiiiii}ddddccc{{i}dddddd}iiiic{{d}iiiiii}ddddcc{{i}dddddd}iiii{c}{c}cccccc{{d}iiiiii}ddddcccc{d}{d}ddc{i}{i}iiccccc{{i}dddddd}iiii{c}{c}ccccccc{{d}iiiiii}ddddcccccc{{i}dddddd}iiii{c}{c}cccccccc{{d}iiiiii}ddddccccc{d}{d}ddc{i}{i}iiccccccc{{i}dddddd}iiii{c}cccccccc{{d}iiiiii}ddddc{{i}dddddd}iiiicccccc{{d}iiiiii}ddddccc{{i}dddddd}iiiic{{d}iiiiii}ddddcc{{i}dddddd}iiiiccccccc{{d}iiiiii}ddddc{{i}dddddd}iiii{c}cccccccc{{d}iiiiii}ddddccccccc{d}{d}ddc{i}{i}iiccccccc{{i}dddddd}iiii{c}ccccc{{d}iiiiii}ddddcccc{{i}dddddd}iiiicccccc{{d}iiiiii}ddddcccc{{i}dddddd}iiiiccccccccc{{d}iiiiii}ddddcccc{{i}dddddd}iiii{c}ccccc{{d}iiiiii}ddddccccccc{d}{d}ddc{i}{i}iicccccccc{{i}dddddd}iiii{c}cc{{d}iiiiii}ddddcccccc{{i}dddddd}iiiiccccccc{{d}iiiiii}ddddccccc{{i}dddddd}iiiiccccccc{{d}iiiiii}ddddcccccc{{i}dddddd}iiii{c}cc{{d}iiiiii}ddddcccccccc{d}{d}ddc{i}{i}iiccccccccc{{i}dddddd}iiiicccccccc{{d}iiiiii}ddddccccccccc{{i}dddddd}iiiiccccccccc{{d}iiiiii}ddddccccc{{i}dddddd}iiiiccccc{{d}iiiiii}ddddccccccccc{{i}dddddd}iiiicccccccc{{d}iiiiii}ddddccccccccc{d}{d}ddc{i}{i}iiccccccccc{{i}dddddd}iiiiccccc{{d}iiiiii}dddd{c}cc{{i}dddddd}iiii{c}c{{d}iiiiii}ddddcc{{i}dddddd}iiiicccccc{{d}iiiiii}dddd{c}cc{{i}dddddd}iiiiccccc{{d}iiiiii}ddddccccccccc{d}{d}ddc{i}{i}ii{c}{{i}dddddd}iiiicc{{d}iiiiii}dddd{c}cccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}cccc{{i}dddddd}iiiicc{{d}iiiiii}dddd{c}{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}{{d}iiiiii}ddddc{{i}dddddd}iiiicccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}{{d}iiiiii}ddddc{{i}dddddd}iiiicccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc{d}{d}ddc{i}{i}ii{c}{c}cccccc{{i}dddddd}iiii{c}ccccccccc{{d}iiiiii}dddd{c}{c}cccccc 

Thought all the Ls would make this shorter - nope!

\$\endgroup\$
1
\$\begingroup\$

C (gcc), 726 bytes

z;int x[]={25,211,25,211,25,211,25,211,25,211,9,67,13,83,13,195,8,71,10,83,10,199,8,74,7,73,2,72,7,202,7,77,5,73,6,68,5,205,6,81,2,69,1,65,2,66,4,68,2,209,5,87,3,67,2,66,4,214,4,87,6,70,2,216,3,87,4,73,2,217,2,88,5,68,5,219,91,8,226,93,10,222,3,93,9,217,6,93,7,213,9,93,6,208,12,86,2,67,5,205,13,84,4,65,5,205,15,80,2,66,3,65,3,204,11,83,3,66,2,65,1,211,9,85,6,216,6,89,7,217,3,93,8,218,98,7,220,1,100,4,219,2,96,1,67,3,218,3,95,3,65,2,218,4,91,6,220,6,82,1,70,3,65,2,71,1,210,6,79,4,70,4,73,4,207,7,76,6,71,5,71,6,204,8,72,9,73,5,69,9,200,8,69,12,75,2,70,12,197,9,66,14,83,14,194,25,74,1,200,25,74,1,200,25,211,25,211,25,83,0},*y=x;f(){while(*y){for(z=*y&0x3f;z;--z)printf("%c",(*y&0x40)?'L':' ');if(*y++&0x80)printf("\n");}} 

Try it online!

The compression is a run time encoding. Every byte consists of a number(the bottom 6 bits), a flag if the character is a 'L' or a ' ' (the 6th bit) and a flag for a newline (the 7th bit)

\$\endgroup\$
4
  • \$\begingroup\$ lmao runtime encoding \$\endgroup\$ Commented May 6, 2020 at 2:05
  • \$\begingroup\$ note that this is a ~1:4 compression, which... isn't great considering this is binary data and you'd probably do better just packing the characters as binary into raw bytes \$\endgroup\$ Commented May 6, 2020 at 2:58
  • \$\begingroup\$ you are right - i just hacked it together because no C answer was here =) \$\endgroup\$ Commented May 6, 2020 at 16:26
  • \$\begingroup\$ 445 bytes \$\endgroup\$ Commented May 6, 2020 at 19:09
1
\$\begingroup\$

C (gcc), 473 bytes

*y=L"øûøûøûøûøûøûúøû„;úøãô;ûøø{„ûûxšûûÄûûcüûûäûûøøûûôûûƒûøûûüûûúûûúûûôûûû;úûû;ûûû;ôûûûøûû„ûûûüûûøûû{äûäûûãäûÄûûGôûûûˆü{ôû{Hûûøû{äûû„ûûû„ûûûôûûûúûûúûûûøûû;øûûû;øûûüûûûsøûûôûûûCúûûäûûûÄûûû„ûûùÌÛûû„û;øôúûûøÅü{úøÄ;:ø›:øûøëøëøûøûøû";main(i,j,z){for(;*y;puts(""))for(i=9;i--;)for(z=4^*y++,j=8;j--;z/=2)putchar(z&1?76:32);} 

Try it online!

binary encoding just as a reference, -> 0, L -> 1. xor'd with 4 so there are no \0 bytes.

\$\endgroup\$
1
  • \$\begingroup\$ probably very suboptimal. this is just to see how long it would be without real compression \$\endgroup\$ Commented May 6, 2020 at 3:23
1
\$\begingroup\$

C (gcc), 310 300 bytes

y,c,l;main(z){for(;z="ICbCbCbCbCR3=C=3A7:C:7@:79287:?=59645==A251122442A;G33224F9G662H7G492I5H545K2K8o:N3M9I9M7E?M6@EF235=ID415=L@22313<JC32211CDE6H?I7I9M8J3R7L1T4K3P133J5O312J7K6L:B1631271B<?46494?=<67576<?8995598@5<;26<5A2>C>2R:18b:18bCbCbC"[y++];l=!l)for(;z-->48;++c%69||puts(""))printf(L" L"+l);} 

Try it online!

a simple RLE. newlines inserted every 69 characters. left and right columns removed to combine some L runs. add I to the end of the data string for nice padding

thanks ceilingcat for -10 bytes

\$\endgroup\$
2
  • \$\begingroup\$ it should be possible to encode as the ascii codepoints directly but that's harder to edit and looks very messy \$\endgroup\$ Commented May 6, 2020 at 2:53
  • \$\begingroup\$ also, should be possible to essentially hardcode the central bar and flip (cf arnauld's answer) but not sure if the tradeoff will be worth it \$\endgroup\$ Commented May 6, 2020 at 2:57
0
\$\begingroup\$

Retina 0.8.2, 313 307 bytes

 19¶19¶19¶19¶19¶3je19¶7jb19¶10h9c8¶13f9g4¶17c5b1c2e4¶23d3c2e2¶23g6c3¶23e9c3¶24f4f4¶27i9¶29jb5¶29j3¶29h2¶29g¶22c3f¶20e1f1¶16c2d1d2¶19d2c1b5¶21g8¶25h6¶29i4¶34h3¶36e3¶32b3d3¶31d1c4¶27g7¶18b6d1c7¶15e6e9¶12g7f7¶8j9f5¶5jd11c6¶2jf19¶10b8¶10b8¶19¶19¶19 \d+ $*L T`l`d \d $*  %+`^.{1,43}$ $& +`(.){34}.(?<-1>.)* $&$1 

Try it online! Edit: Saved 4 bytes by encoding the left two thirds instead of the right two thirds. Explanation: Uses run-length encoding. The integers encode runs of up to 34 Ls while the letters b-j encode runs of 1-9 spaces with jb-jf encoding runs of 10-14 spaces as this saves a byte in the decoder. The first stage simply inserts the encoded data.

\d+ $*L 

Run-length decode the integers to Ls.

T`l`d 

Transpose the lower case letters to digits in preparation for run-length decoding.

\d $* 

Run-length decode the digits to spaces (each digit decoded separately).

%+`^.{1,43}$ $& 

Pad all the lines to 44 characters.

+`(.){34}.(?<-1>.)* $&$1 

Note down the first 34 characters of each line, then skip a character, then start forgetting the noted characters. Append the first remaining character. Repeat until all lines are 69 characters long. This mirrors the left-hand third of the output to the right.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.