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 905761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:16:23+00:00 2026-05-15T16:16:23+00:00

Here is what I am looking for: I need to open a zip file

  • 0

Here is what I am looking for:

I need to open a zip file of images and iterate through it’s contents. First of all, the zip container file has subdirectories and inside one “IDX” houses the images I need. I have no problem extracting the zip file contents to a directory. My zip files can be incredibly huge, as in GBs huge, and so I am hoping to be able to open the file and pull out the images as I iterate through them one at a time to process them.

After I am done I just close the zip file. These images are actually being housed in a database.

Does anyone have any idea how to do this with, hopefully, free tools or built-in api’s? This process will be done on a Windows machine.

Thanks!

  • 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-15T16:16:24+00:00Added an answer on May 15, 2026 at 4:16 pm

    SharpZipLib is a great tool for your requirements.

    I have used it to process giant files within directories within giant nested zip files (meaning ZIP files within ZIP files), using streams. I was able to open a zip stream on top of a zip stream so that I could investigate the contents of the inner zip without having to extract the entire parent. You can then use a stream to peek at the content files, which may help you determine whether you want to extract it or not. It’s open-source.

    EDIT: Directory handling in the library is not ideal. As I recall, it contains separate entries for some directories, while others are implied by the paths of the file entries.

    Here’s an extract of the code I used to collect the actual file and folder names at a certain level (_startPath). Let me know if you’re interested in the whole wrapper class.

    // _zipFile = your ZipFile instance
    List<string> _folderNames = new List<string>();
    List<string> _fileNames = nwe List<string>();
    string _startPath = "";
    const string PATH_SEPARATOR = "/";
    
    foreach ( ZipEntry entry in _zipFile )
    {
        string name = entry.Name;
    
        if ( _startPath != "" )
        {
            if ( name.StartsWith( _startPath + PATH_SEPARATOR ) )
                name = name.Substring( _startPath.Length + 1 );
            else
                continue;
        }
    
        // Ignore items below this folder
        if ( name.IndexOf( PATH_SEPARATOR ) != name.LastIndexOf( PATH_SEPARATOR ) )
            continue;
    
        string thisPath = null;
        string thisFile = null;
    
        if ( entry.IsDirectory ) {
            thisPath = name.TrimEnd( PATH_SEPARATOR.ToCharArray() );
        }
        else if ( entry.IsFile )
        {
            if ( name.Contains( PATH_SEPARATOR ) )
                thisPath = name.Substring( 0, name.IndexOf( PATH_SEPARATOR ) );
            else
                thisFile = name;
        }
    
        if ( !string.IsNullOrEmpty( thisPath ) && !_folderNames.Contains( thisPath ) )
            _folderNames.Add( thisPath );
    
        if ( !string.IsNullOrEmpty( thisFile ) && !_fileNames.Contains( thisFile ) )
            _fileNames.Add( thisFile );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just looking for the first step basic solution here that keeps the honest people
So what I'm looking for here is something like PHP's print_r function. This is
Most importantly, why did it fail? What I'm looking for here is pathologies that
Looking for some direction here as I'm running into some migration problems. We have
Here's the flow I'm looking for for authentication: Attempt to pull in the user's
I'm looking for ideas and opinions here, not a real answer, I guess... Back
While looking at a micro-optimization question that I asked yesterday ( here ), I
So here's what I'm looking to achieve. I would like to give my users
Here's my problem - I'd like to communicate between two websites and I'm looking
Looking up LINQ and Or in google is proving somewhat difficult so here I

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.