mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Large folder (> 3Gib) throws exception "Stream was too long" #632
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xhuan8 on GitHub (Apr 23, 2024).
Hi, is it possible to turn on "x64" for large folder or this feature is not ready?
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, IEnumerable
1 oldEntries, IEnumerable1 newEntries)at SharpCompress.Archives.AbstractWritableArchive`2.SaveTo(Stream stream, WriterOptions options)
@adamhathcock commented on GitHub (Apr 23, 2024):
It must only be partially implemented. I know Zip64 extraction is done by Zip64 creation must still need some work
@Morilli commented on GitHub (Feb 18, 2025):
This is a limitation of the
MemoryStreamor rather the fact that arrays are limited to ~2^31 elements. You could implement your own custom stream that stores data in multiple arrays or pass in a stream that does not store all written data in memory directly.@xhuan8 commented on GitHub (Feb 26, 2025):
@Morilli You are right.