Title: Java Xmemcached or Spymemcached client unable to get the key value which is set by C# Enyim client
Tags: java;c#;spymemcached;enyim;xmemcached
Question: Java Xmemcached or Spymemcached client are unable to get the correct value from memcached by key which is set by C# Enyim client.

We have already tried set C# MemcachedProtocol.Binary to Text to store basic String format data, but both Java Xmemcached client and Spymemcached client are not able to get the data. The errors are below:

```2018-01-11 11:08:06.655 [ERROR] [main] BaseSerializingTranscoder: Failed to decompress data
java.util.zip.ZipException: Not in GZIP michaelmiller@example.org(GZIPInputStream.java:165) ~[?:1.8.0_144]
at java.util.zip.GZIPInputStream.(GZIPInputStream.java:79) ~[?:1.8.0_144]
at java.util.zip.GZIPInputStream.(GZIPInputStream.java:91) ~[?:1.8.0_144]
at net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.gzipDecompress(BaseSerializingTranscoder.java:274) [xmemcached-2.4.0.jar:?]
at net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.decompress(BaseSerializingTranscoder.java:219) [xmemcached-2.4.0.jar:?]
at net.rubyeye.xmemcached.transcoders.SerializingTranscoder.decode(SerializingTranscoder.java:87) [xmemcached-2.4.0.jar:?]
at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:657) [xmemcached-2.4.0.jar:?]
at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:1085) [xmemcached-2.4.0.jar:?]
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1043) [xmemcached-2.4.0.jar:?]
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1065) [xmemcached-2.4.0.jar:?]
```

If we use StringTranscoder(), the error will be decoding String error:

```Exception in thread "main" java.lang.RuntimeException: Decode String michaelmiller@example.org(StringTranscoder.java:35)
at net.rubyeye.xmemcached.transcoders.StringTranscoder.decode(StringTranscoder.java:11)
at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:657)
at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:1085)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1043)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1065)
```



Here is another answer: The problem has been fix by writing a custom transcoder and ignoring the GZIP/ZIP flag part.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2018:00:01/15/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<java><c#><spymemcached><enyim><xmemcached>', 'Title': 'Java Xmemcached or Spymemcached client unable to get the key value which is set by C# Enyim client', 'ViewCount': 340, 'id': 48270625, 'user_AboutMe': None, 'user_AccountId': 12691316.0, 'user_DisplayName': 'Jason Wu', 'user_Reputation': 1.0, 'user_Views': 3.0, 'user_id': 9221283.0}}