This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I compressed a string using GZIPOutputStream. Now when i try to uncompress it using GZIPInputStream throws the following exception "java.util.zip.ZipException: invalid bit length repeat" while reading from the stream.
Anyone who has compressed and or uncompressed strings, please help.
You may need to base 64 encode the strings first depending upon what exactly is in them. There are severl Base 64 encoders out there (may be one in standard J2SE now not sure) but if not check apache's website.
Hi, I registered to the site just to answer: it might be 8 years too late, but it still is interesting to some people who stumble upon that question (like me).
In the end, Alexandr's solution was the one that worked for me, and I'm happy he took time to write it, despite Jesper's comment!