I have a Java backend that uses Inflater. I want to pass data through Node.js.
Is there an equivalent Deflater class?
EDIT: I have to clarify a bit. I tried using https://github.com/dankogai/js-deflate , and then base64 encoded the result and passed it to a very simple Java program that base64 decodes it and tries to inflate it (creating a simple backend emulation), but I get an exception :
java.util.zip.DataFormatException: unknown compression method
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(Unknown Source)
at java.util.zip.Inflater.inflate(Unknown Source)
And I know that the Base64 coding process works correctly from both ends.
I should also note that I cannot change the Java backend.
source
share