Giter Club home page Giter Club logo

Comments (7)

ninad2110 avatar ninad2110 commented on August 26, 2024 1

Thank you weltkante!

Fork repo: ninad2110 / managed-lzma
Summary of changes

  1. Added sample folder in /sandbox-7z/
    Example/
    Sample/ => Contains files to be archived
    Pack/ => Sample folder will be archived to trial.7z pack = true => Success
    Unpack/ => Unpack trial.7z here pack=false, unpacking fails
  2. sandbox-7z is set as startup project
  3. Modified \sandbox-7z\Program.cs
    pack = true calls CreateArchieve() ==> success
    pack = false calls UnpackArchive() ==> fails with InvalidDataException exception

Note: Changed Compression\Lzma\EncoderSettings.cs to set level=1 (LZMA:16), but not related to above changes

from managed-lzma.

weltkante avatar weltkante commented on August 26, 2024 1

Doesn't look like it has anything to do with relative paths, but rather with empty files. Not sure what goes wrong there, either I'm encoding them wrong or the metadata reader is overly strict. I'll check in the next few days why the zero size check is in there.

from managed-lzma.

ninad2110 avatar ninad2110 commented on August 26, 2024 1

System.IO.InvalidDataException
HResult=0x80131501
Message=Found invalid data while decoding.
Source=managed-lzma
StackTrace:
at ManagedLzma.SevenZip.FileModel.ArchiveFileModelMetadataReader.ReadMetadata(Stream stream, PasswordStorage password) in D:\github\ninad2110\managed-lzma\shared\SevenZip\ArchiveFileModel.cs:line 303
at sandbox_7z.Program.UnpackArchive(String archiveFileName, String targetDirectory, PasswordStorage password) in D:\github\ninad2110\managed-lzma\sandbox-7z\Program.cs:line 146
at sandbox_7z.Program.UnpackArchive(String archiveFileName, String targetDirectory, String password) in D:\github\ninad2110\managed-lzma\sandbox-7z\Program.cs:line 132
at sandbox_7z.Program.Main() in D:\github\ninad2110\managed-lzma\sandbox-7z\Program.cs:line 43
debug

Added archive in
Fork repo: ninad2110 / managed-lzma
Archive file : /sandbox-7z/Example/Pack/Data.7z

from managed-lzma.

weltkante avatar weltkante commented on August 26, 2024 1

The second exception is due to containing attribute metadata for a directory in a way which would not have been generated by the codebase I ported. In other words its a genuine "this data is not supposed to be here" exception. I'd have to investigate how newer versions of the 7zip codebase would treat it, but thats not going to happen anytime soon.

from managed-lzma.

weltkante avatar weltkante commented on August 26, 2024

I'll have a look, but it'd help if you can be more detailed on what you changed to produce this file (alternatively fork the repo and point me to your changes)

from managed-lzma.

ninad2110 avatar ninad2110 commented on August 26, 2024
  • Checked by adding contents to empty file(s), and it worked.

  • I have another 7z which isn't working, actually I tried to create similar 7z. To me, looks like some other issue with archived 7z file. I will do more tests and analyze and get back on this.

from managed-lzma.

weltkante avatar weltkante commented on August 26, 2024

To me, looks like some other issue with archived 7z file.

The stack trace of the exception may be useful to classify it if you can't share the archive or repro it (though I can't guarantee I can fix it based on an exception stacktrace alone)

from managed-lzma.

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.