Multivolume not working for only a single volume

Aug 5, 2009 at 12:41 PM


this does work for me if the files to compress are big enough to produce several volumes:

            SevenZipCompressor szComp = new SevenZipCompressor(true);
            szComp.VolumeSize = 1024 * 1000 * 10;
            szComp.CompressionMethod = CompressionMethod.Lzma;
            szComp.CompressionMode = CompressionMode.Create;
            szComp.CompressionLevel = CompressionLevel.High;    //Ultra throws Exception...
            szComp.ArchiveFormat = OutArchiveFormat.SevenZip;
            szComp.PreserveDirectoryRoot = false;
            szComp.CompressDirectory(tempDir, _targetFileName);

But if the resulting compressed file is smaller than VolumeSize, just a file "name.7z.001" with size of 32 bytes is created. Opening this file shows "name.7z" in the file list, but this file can not be extracted.

When removing the "szComp.VolumeSize = 1024 * 1000 * 10;" line completely it produces a single compressed 7z file without problems.

Aug 6, 2009 at 6:25 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.