I used your library to get key/values from my memcached-cluster. The values are binary-strings, which were filled by C-program with length 516 bytes. After I get such a key/value with you library, the resulting string is only 512 bytes.
I looked in your code and set the encoding in lin 183 explicit to "binary". This fixed my problems.
IMHO encoding must not be set to utf-8 because the payload in values are binary.
If only your client is used to get/set key/values, then it works.
Perhaps you should always encode/decode strings as Buffers ?
https://github.com/3rd-Eden/memcached/blob/96b962d2c2c25f623e8d5247c6fda90e83cca3b8/lib/memcached.js#L183
I used your library to get key/values from my memcached-cluster. The values are binary-strings, which were filled by C-program with length 516 bytes. After I get such a key/value with you library, the resulting string is only 512 bytes. I looked in your code and set the encoding in lin 183 explicit to "binary". This fixed my problems. IMHO encoding must not be set to utf-8 because the payload in values are binary. If only your client is used to get/set key/values, then it works. Perhaps you should always encode/decode strings as Buffers ?