Update 2 (newest) Here’s the situation: A foreign application is storing zlib deflated (compressed) data in this format: 78 9C BC (…data…) 00 00 FF FF – let’s call it DATA1 If I take original XML file and deflate it in Java or Tcl, I get: 78 9C BD (…data…) D8 9F 29 BB – let’s call it DATA2 Definitely