[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BinSCII v2.0 ??????



In article <jmk3.759559789@crux1.cit.cornell.edu>,
Jay Krell <jmk3@crux3.cit.cornell.edu> wrote:
>> better encoding (4 bytes into  5 characters instead of 3 into 4)
> 
>Todd,
>  Shouldn't it be possible to encode 13 bytes in 16?
>I count 94 characters on my keyboard. lg(94) is just over 6.5.
>You should be able to encode 6.5 bits per character.
>I'm positive this is doable, but I can't think at the moment how
>to do it.
>
>--
>  --Jay, jay.krell@cornell.edu

If you did a little bit of algebra you'd see that he's doing about as good as
13 bytes in 16.  4 bytes into 5 characters times 3 gives 12 bytes into 15
characters.  Just adding one un-encoded byte (Not exactly possible, but..)
gives 13 into 16.  However, the problem with using the entire Apple II 
keyboard is that all of those characters may not be transmitted by certain 
'text only' interfaces.  What you CAN rely on is all of the upper and lower 
case letters, and 0-9, giving 26*2+10=62 characters.  Punctuation characters
should be safe too (space probably isn't for ends of lines..), so you can 
easily get 64 good characters letting you encode six bits per character. 
That's how you end up with 3 bytes in four characters.  It will take 85 
characters available to get 4 in 5 compression, which may be pushing it.
I'll be interested to see if it works at all sites..  Let's see, if we 
use !@#$%^&*()-_=+,./<>?;:'" that would give 86 characters.  However, I'm 
not sure all of those characters can be guaranteed to be considered text 
characters at all sites.  Some sequences like ./ or such may be considered
command sequences.  At any rate, another reason for not going for the 13 into
16 that you suggest is that it would make calculation slightly more complex,
cause the line to have to end at 64 characters instead of 75 (adding extra
newline characters which decrease the efficiency of your compression), and
force tacking on an additional 11 characters vs. 3 for end of a file (in the
case of a single byte ending..)  I guess I'm rambling and this is all 
somewhat pointless, but..  I never have quite understood why the Apple 
internet community didn't just go ahead and adopt UUENCODE like everyone 
else, although of course Apple users always must be different..  (Flame 
bait there I know, but..)  Anyone know the history of Binscii?  

Michael Foegelle
     
-- 
   Michael Foegelle  | Call Wunderland BBS! |   foegelle@ccwf.cc.utexas.edu
    University of    | (512) 472-0544  8n1  |   foegelle@utaphy.ph.utexas.edu
   Texas at Austin   | 14.4kbaud, v.32/bis  |   GEnie:   M.FOEGELLE2
  Physics Department | 500 megs on a //e!   |   > Ask me about Columns //e! <