Coder Social home page Coder Social logo

When extracting single file from archive "FileExtractionStarted", "Extracting" and "FileExtractionFinished" event show all files extracting. about sevenzipsharp HOT 1 CLOSED

squid-box avatar squid-box commented on August 15, 2024
When extracting single file from archive "FileExtractionStarted", "Extracting" and "FileExtractionFinished" event show all files extracting.

from sevenzipsharp.

Comments (1)

squid-box avatar squid-box commented on August 15, 2024

Sorry for the delay, I gave an answer on StackOverflow, which I'll duplicate here:

The reason you're getting so many file extraction events when just trying to extract one file is due to the fact that 7z archives are created using solid compression.

When you try to extract a single file from a solid archive, the decompression starts at the beginning of the file and goes through it until it finds the file you were looking for. Your archive is the worst-case scenario, where the file you're looking for is at the end of the archive (your results show "New Text Document.txt" being extracted last).

The solution to your problem depends on what you need to achieve in the end, and what power you have over the creation of the archive. If you need to extract just the one file, and can change the archive format, I'd aim for some format that does not use solid compression (eg. zip). If you're forced to use the 7z file, and need to use several of the files, the best course would probably be to extract them all to a temporary directory and work on them there.

from sevenzipsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.