On Thu, 11 May 2000, Lee Daniel Crocker wrote: > > In the current protocol, fields of all types are represented the > > same. They are an arbitrary number of bytes terminated with a newline. > > Actually, it's an arbitrary number of bytes in the range 0x20..0xFF > encoded in UTF-8, representing a Unicode string with code points in the > range 0x0020...0xFFFF.
Why does it matter whether it is UTF or not if we only handle up to 0xFF? > > In a binary protocol you could save a lot of space by representing the 160 > > bit key hash as 20 bytes whereas in the current protocol it's a 40 byte > > hex string. > > Space is almost certainly a non-issue. Conversion time is more of an > issue for a simulator than a real server, because it isn't network I/O > bound. But even if you could build such a simulator, it wouldn't be a > very good one because it wouldn't actually be simulating the way real > servers use the real protocol. If a badly formed string in the header > fields might cause a problem, we should be able to simulate that too. > > The first rule of solid code is that debug code should be as close to > the real thing as possible. Making a simulator different from what it > is trying to simulate is just asking for trouble. It's not just about the testbed. It is about flexibility in general. It is about the transport being as self contained as possible. > > -- > Lee Daniel Crocker <lee at piclab.com> <http://www.piclab.com/lee/> > "All inventions or works of authorship original to me, herein and past, > are placed irrevocably in the public domain, and may be used or modified > for any purpose, without permission, attribution, or notification."--LDC > > > _______________________________________________ > Freenet-dev mailing list > Freenet-dev at lists.sourceforge.net > http://lists.sourceforge.net/mailman/listinfo/freenet-dev -- Oskar Sandberg md98-osa at nada.kth.se #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev
