Results 1 to 2 of 2
  1. #1
    shandowspy is offline Member
    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    Default Gzip from c# to java decoding from b64 issue

    Hello.

    I receiving base64 String contains gzip file, from our team working with C#.
    When I trying to decode and open it with GZIP in Java I got this exception

    Exception in thread "main" java.util.zip.ZipException: Not in GZIP format
    at java.util.zip.GZIPInputStream.readHeader(Unknown Source)
    at java.util.zip.GZIPInputStream.<init>(Unknown Source)
    at java.util.zip.GZIPInputStream.<init>(Unknown Source)
    at main.main(main.java:41)

    Is there is some difference from base64 in C# and Java?
    And how I can solve this problem?

    Thanks in advance

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default Re: Gzip from c# to java decoding from b64 issue

    Look at the file in a hex editor and compare its contents to a good file to see if there are any obvious differences.
    What file was base64 encoded? The zip file or the contents of the zip file?

Similar Threads

  1. Decoding
    By ljd0991 in forum New To Java
    Replies: 6
    Last Post: 10-28-2011, 06:43 PM
  2. Decompress (un-gzip) a byte[]?
    By NeuroFuzzy in forum New To Java
    Replies: 2
    Last Post: 02-10-2011, 02:12 PM
  3. Replies: 6
    Last Post: 08-10-2010, 09:22 AM
  4. Gif decoding/LZW troubles
    By hellochar in forum Advanced Java
    Replies: 2
    Last Post: 07-14-2009, 11:26 PM
  5. gZIp decompression with j2se
    By ashakthi84 in forum Networking
    Replies: 1
    Last Post: 12-25-2007, 04:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •