Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7630383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:05:19+00:00 2026-05-31T06:05:19+00:00

I am having some issues in dealing with zip files on Mac OS X

  • 0

I am having some issues in dealing with zip files on Mac OS X 10.7.3.

I am receiving a zip file from a third party, which I have to process. My code is using ZipInputStream to do this. This code has been used several times before, without any issue but it fails for this particular zip file. The error which I get is as follows:

java.util.zip.ZipException: invalid compression method
    at java.util.zip.ZipInputStream.read(ZipInputStream.java:185)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
    at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

I googled about it and I can see that there are some issues with ZipInputStream, e.g. this one.

I have also found some related questions on Stackoverflow, e.g. this one. But there is no proper, accepted/acceptable answer.

I have a couple questions:

  1. Has anyone found any concrete solution for this? Like any lates
    update or an all together different JAR which has same functionality
    but no issues
  2. On this link, the user phobuz1 mentions that "if
    non-standard compression method (method 6)"
    is used, then this
    problem occurs. Is there a way to find out which compression method
    is used? So that I can be sure of the reason of failure?

Note that as with some users, if I unzip the file on my local machine and re-zip it, it works perfectly fine.

EDIT 1:

The file which I am getting is in .zip format, I don’t know which OS/utility program they are using to compress it. On my local machine I am using the built-in zip utility which comes with Mac OS X.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:05:21+00:00Added an answer on May 31, 2026 at 6:05 am

    API JAVADOC :
    THIS is what actually compresses your file ( Updated Feb 2021 note, the oracle provided link expired, Duke University (no affiliation) however has the antiquated 1.4 javadoc available) : https://www2.cs.duke.edu/csed/java/jdk1.4.2/docs/api/java/util/zip/ZipEntry.html

    per that interface, you are able to get and set compression methods ( getCompression() and setCompression(int), respectively).

    good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having some issues running my code local. I have host file setup like this:
Having some issues accessing my param tags from within actionscript. Essentially I have the
I have been having some issues with LINQ-To-SQL around memory usage. I'm using it
having some issues with a networking assignment. End goal is to have a C
Having some issues getting this MPMoviePlayerViewController to work. I have two sample URLs pointing
I believe I may be dealing with some view issues which are not allowing
Having some issues with C. I have this is my code: // First line
I'm having some issues returning unique results from a table that has some repeating
Having some issues querying back from Mongo on Id when it's a guid. I
I'm having some issues with a Wordpress website I recently built. I have implemented

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.