Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1156
| Newsgroups | comp.lang.postscript |
|---|---|
| Date | 2012-12-08 13:51 -0800 |
| References | <ka06du$643$1@dont-email.me> |
| Message-ID | <d9658ec7-bf33-46eb-b014-e5808ae3b1bb@googlegroups.com> (permalink) |
| Subject | Re: golfing again |
| From | zupftom@googlemail.com |
Am Samstag, 8. Dezember 2012 21:02:51 UTC+1 schrieb luser- -droog: > I've been toying around with binary encodings and here are some results. > > > > The (mini-)goal is to shrink this sequence to read an input line from the > > source file: > > > > currentfile 999 string readline pop > > 35 chars > > > > A Binary Object Sequence starts with a four-byte header > > type length byte-length > > 129 5 ?? ?? > > > > Then an executable name > > type unused -1=systemname 32bit value > > 83 0 -1(16bits) 31 currentfile > > > > An integer is > > type unused lowbyte hibyte > > 01 0 999(16bits) > > > > So 4 + 6 (for the number) + 8 * 4 (names) = 42. Forget BOS! > > > > > > Binary Tokens are a little more promising, but limits to the first 255 > > system names. > > > > type val > > 146=x-sys-name 31=currentfile > > 135=LE-16b-int 999_10 = E7 03 > > 146 165=string > > 146 125=readline > > 146 117=pop > > > > As a hex-string, > > <921F87E70392A5927D9275>cvx exec > > 32 chars. > > > > Not much. :( You can shrink this to 11 bytes using binary token sequence in a real binary file. Hexdump: $ hexdump -C test.ps 00000000 92 1f 39 39 39 92 a5 92 7d 92 75 |..999...}.u| 0000000b
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
golfing again "luser.droog" <luser.droog@gmail.com> - 2012-12-08 14:02 -0600
Re: golfing again zupftom@googlemail.com - 2012-12-08 13:51 -0800
Re: golfing again "luser.droog" <luser.droog@gmail.com> - 2012-12-08 19:18 -0600
Re: golfing again tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2012-12-09 00:54 -0500
47-char binary-name-string exec/Implicitly-named procedures (Re: golfing again) luser- -droog <mijoryx@yahoo.com> - 2012-12-16 15:58 -0800
Re: 47-char binary-name-string exec/Implicitly-named procedures (Re: golfing again) luser- -droog <mijoryx@yahoo.com> - 2012-12-16 16:02 -0800
csiph-web