Skip to content
New issue

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

Large folder (> 3Gib) throws exception "Stream was too long" #833

Open
xhuan8 opened this issue Apr 23, 2024 · 1 comment
Open

Large folder (> 3Gib) throws exception "Stream was too long" #833

xhuan8 opened this issue Apr 23, 2024 · 1 comment

Comments

@xhuan8
Copy link

xhuan8 commented Apr 23, 2024

Hi, is it possible to turn on "x64" for large folder or this feature is not ready?

using (var archive = ZipArchive.Create())
{
    archive.AddAllFromDirectory(path);
    archive.SaveTo(stream);
}

exception: System.IO.IOException: Stream was too long.
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at SharpCompress.IO.CountingWritableSubStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at SharpCompress.Compressors.Deflate.ZlibBaseStream.finish()
at SharpCompress.Compressors.Deflate.ZlibBaseStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at SharpCompress.Compressors.Deflate.DeflateStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at SharpCompress.Writers.Zip.ZipWriter.ZipWritingStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Stream.Dispose()
at SharpCompress.Writers.Zip.ZipWriter.Write(String entryPath, Stream source, ZipWriterEntryOptions zipWriterEntryOptions)
at SharpCompress.Archives.Zip.ZipArchive.SaveTo(Stream stream, WriterOptions options, IEnumerable1 oldEntries, IEnumerable1 newEntries)
at SharpCompress.Archives.AbstractWritableArchive`2.SaveTo(Stream stream, WriterOptions options)

@adamhathcock
Copy link
Owner

It must only be partially implemented. I know Zip64 extraction is done by Zip64 creation must still need some work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants