Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,205 of 4,675    |
|    wolfgang kern to John    |
|    Re: Hex to bin    |
|    29 Dec 17 19:51:15    |
      From: nowhere@never.at              Kerr-Mudd,John wrote:              >>> Going back to the summer fun we had with B64 decoding, here's a Hex       >>> decoder that saves to file, rather than running directly. It uses       >>> StdIO.       >>> (I think there's a size limit of about 95k input - all the output is       >>> held in 48k-512 of the code segment and there's only 1 write!)              >> Shorter version using aad:              > shorter still using both aad and aam (doh!)              > ZRhLUht/Rh00X501PRR4hPPaUV1GG1GIUXH5qY1Ge6G8+r6238wbt083t+RUZ22=       > 6602Zffffff0222F6====MJ=20=17======eeee+++Di7XogbaDe6TH8G7JAs77Z       > H8tlwAro/VtsRAf7ssoAlpfrMIH7u7tlt7B9ewG8ECW7I8ITD7vcSCupt7I7sCj8       > a7c88NrkAeJAP7ety8wAtl/Vts9V=              I may soon find a few hours to check on it in more detail, what I       saw so far is that you convert the 2:1 in place now.              But I played around with several TEXT2BIN variants and found the       5:4 encoding as the best compromise:              Base64 is restricted and may be just good for Big Endian machines.       [4:3] ratio=1.33              Herberts 4:3 is much better than Base64 but still got a ratio of [1.33]              Terjes 13:8 may be good for very large sources, but isn't easy to       make it an SMC variant, so the decoder needs to use a 2:1 before       [16:13] ratio=1.230769              My latest solution (best compromise for me yet) is [5:4] ratio 1.25       because it's easy to SMC it and it's much shorter than the [13:8].              So finally I'd recommend to use the 5:4 encoding.       it needs (the 5th root of 2^32 = 84.4485) ~85=0x55 characters.       It may use char0x22 " as start and end indicator and use 0x23..0x78       for en-/de-coding.       It's easy to make that an SMC-variant, and when once everyone got such       a tiny tool we could share binaries of any size either RM or PM or LM.       __       wolfgang              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca