mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-10 21:22:11 +00:00
AWS S3 HashStream #532
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 @i2um1 on GitHub (Aug 18, 2022).
Hi,
According to the documentation:
The major feature is support for non-seekable streams so large files can be processed on the fly (i.e. download stream).
But the following code does not work:
Exception:
Please see https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/Internal/Util/HashStream.cs
Is it possible to handle HashStream in memory?
@Erior commented on GitHub (Aug 25, 2022):
ZipArchive uses the CentralDirectory stored at the end of the file, and requires the Seek functionality, you can as you propose copy the stream into a temporary file or MemoryStream and use ZipArchive on that.
Or use the ReaderFactory.
@i2um1 commented on GitHub (Aug 26, 2022):
So, it looks like a temporary file is the best solution when an input file is extremely big and there's no enough information about a file. ReaderFactory is a partial solution. Thank you!