Jonathan Hess wrote:
> Sorry, catching up on old mail. Why not encode the bitflag to an
ascii > int and pass that down the wire. Still text, still compact. ;/
I curse myself for replying directly to eric instead of to the list !!!
anyways.. here's my mail together with eric's reply.
----- My mail ----------------------------------------
eric wrote:
>> If you use context, use binary flags instead of string names - you can
>> save alot of bandwidth - instead of 18 bytes ("base,main,operator") you
>> have just 2 bytes (in a text protocol, 1 byte if we can cheat) (using
>> table described below).
>>
>> base 0
>> identify 1
>> auth 2
>> main 4
>> operator 8
>>
>> base|main|operator = 12
>
>
>
> earlier, we have said we won't use binary values inside a text
protocol to have something clean.
Well dont treat is at a binary value then, use text. The integer "12" is
2 bytes (characters) in text, and 1 byte in a binary one, that what I
meant with `cheating' (using binary values inside a text protocol).
Do you get me?
Instead of having a string with names (seperated by commas) sent in
messages you send the integer values instead. And per my example instead
of 18 bytes (characters) you send 2 bytes.
I dont say that we use a binary protocol, but we still send bytes
because we are working with computers!!! I assumed you'd understand that!
/Carl-Adam
----- Eric's reply ------------------------------------
>Well dont treat is at a binary value then, use text. The integer "12" is
>> 2 bytes (characters) in text, and 1 byte in a binary one, that what I
>> meant with `cheating' (using binary values inside a text protocol).
>> Do you get me?
>> Instead of having a string with names (seperated by commas) sent in
>> messages you send the integer values instead. And per my example instead
>> of 18 bytes (characters) you send 2 bytes.
>> I dont say that we use a binary protocol, but we still send bytes
>> because we are working with computers!!! I assumed you'd understand
that!
Ok, you want to use numeric value instead of plain text name. I agree,
it is
shorter.
Eric