[erlang-questions] ei_decode ???

Sanjaya Vitharana sanjaya@REDACTED
Wed Oct 4 07:05:04 CEST 2006


Hi

Consider a List [A,B] where A,B=ANY integer (including 0..255)

So how to decode it using ei_decode functions??

Reason:
(condsidering ei_get_type(buf, &index, &type, &size))
1.) [A,B] where ANY of A,B > 255 so [A,B] = List (ei_decode_list_header(...) works fine here)
2.) [A,B] where A,B <= 255 so [A,B] = String (in this case how to use ei_decode_string(...) to decode the values of A,B ??)

of course I can use tuple to do this quickly. But like to know how to decode 2.) for my general knowledge 

Thanks in advance

Sanjaya Vitharana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061004/c0c188bf/attachment.htm>


More information about the erlang-questions mailing list