We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My code
using (FileStream fs = File.Open(outFile,FileMode.OpenOrCreate)) { foreach (var file in args.Where(File.Exists)) { compressor.CompressFiles(fs, new string[] { file }); compressor.CompressionMode = SevenZip.CompressionMode.Append; } foreach (var dir in args.Where(Directory.Exists)) { compressor.CompressDirectory(dir, fs); compressor.CompressionMode = SevenZip.CompressionMode.Append; } }
the exception
nhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'SevenZipCompressor [1201132722]' was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at SevenZip.SevenZipLibraryManager.InArchive(InArchiveFormat format, Object user) at SevenZip.SevenZipCompressor.SetCompressionProperties() at SevenZip.SevenZipCompressor.GetArchiveUpdateCallback(FileInfo[] files, Int32 rootLength, String password) at SevenZip.SevenZipCompressor.CompressFilesEncrypted(Stream archiveStream, Int32 commonRootLength, String password, String[] fileFullNames) at SevenZip.SevenZipCompressor.CompressFilesEncrypted(Stream archiveStream, String password, String[] fileFullNames) at SevenZip.SevenZipCompressor.CompressFiles(Stream archiveStream, String[] fileFullNames)
The text was updated successfully, but these errors were encountered:
I want to compress to a memory stream so i dont have to touch disk but is not workin
Sorry, something went wrong.
If you compress a file array then if you save the stream data to a file the file mises the 7z header and doesnt work to open it with 7zip
No branches or pull requests
My code
the exception
The text was updated successfully, but these errors were encountered: