Read about this format here... http://en.wikipedia.org/wiki/Bencode
Encodes an array of items as a bencoded string.
array |
Expects an Array with items of the following kind... For example here is a valid argument with different items... |
A String containing the encoded data. For example...
Same as *encode but returns an array with 8bit bytes suitable for sending over serial port.
An Int8Array containing the encoded data as 8bit bytes. For example...
Same as *decode but useful when decoding data received from the serial port.
array |
An Int8Array with 8bit values. |
Same as *decode but takes a String as argument. This is the more common method for decoding (compare *decode and *decodeBytes).
string |
A bencoded String |
Decodes a bencoded stream of characters in to an array of items (Integer, String, Array, Dictionary). Usually it is easier to use the *decodeString method as it will automatically create a CollStream out of the argument string.
stream |
A CollStream. |