Comments (7)
Thank you weltkante!
Fork repo: ninad2110 / managed-lzma
Summary of changes
- 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 - sandbox-7z is set as startup project
- 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.
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.
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
Added archive in
Fork repo: ninad2110 / managed-lzma
Archive file : /sandbox-7z/Example/Pack/Data.7z
from managed-lzma.
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.
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.
-
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.
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)
- ArchiveFileModel does not expose file metadata HOT 3
- Implement DELTA and BZIP2 decoders
- Could not install package 'ManagedLzma 0.2.0-alpha-4' HOT 3
- No able unzip when the source file over 20mb folder when Zip file with LZMA2 and AesEncoder HOT 2
- Support linux file attributes in 7z archives HOT 7
- Extract posix file attributes from 7z archives
- readme.md documentation
- Get feedback on amount of unflushed data in buffers HOT 1
- Implement PPMD decoder without using 'unsafe' code
- Consider using `ref return` feature
- Create .NET Standard 2.0 package HOT 1
- Decoding Exception HOT 4
- Decoder performance
- How to compress a Byte Array Or MemoryStream? The library needs documentation. HOT 1
- OverflowException in ctor of master/7zip/Decoder/BufferedStream.cs HOT 1
- How to add a folder and add files under the folder? HOT 3
- Multithreaded operation possilble? HOT 6
- Unable to decompress zero lenght file
- Data decompresses with C++ but exceptions when decompressed with managed lzma HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from managed-lzma.