You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should encode an object into a buffer. If a buffer is passed as the second argument the object should be encoded into that buffer. Otherwise a new buffer should be allocated. If an offset is passed as the third argument the object should be encoded at that byte offset. The byte offset defaults to 0
After encoding encoding.encode.bytes should be set to the amount of
bytes used to encode the object.
obj = encoding.decode(buffer, [start], [end])
Should decode an object from a buffer. If a start-offset is passed as the second argument the object should be decoded from that byte offset. The start-offset defaults to 0. An end-offset can be passed as the third argument specifying at which byte to end the decoding (not including the byte at the end-offset). The end defaults to buffer.length.
After decoding encoding.decode.bytes should be set to the amount of bytes used to decode the object
length = encoding.encodingLength(obj)
Should return the amount of bytes needed to encode obj.