Skip to content

2 GB Size Limit - Which File? #5242

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

Closed
ebmgithub opened this issue Dec 20, 2019 — with docs.microsoft.com · 3 comments
Closed

2 GB Size Limit - Which File? #5242

ebmgithub opened this issue Dec 20, 2019 — with docs.microsoft.com · 3 comments
Labels
area-archive Area - Microsoft.PowerShell.Archive module issue-question Issue - support question

Comments

Copy link

Does the 2 GB size limit apply to the Path (source) file or the Destination (.zip) file ?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@chasewilson chasewilson added area-language Area - PowerShell syntax and keywords issue-question Issue - support question labels Dec 20, 2019
@chasewilson
Copy link
Contributor

@ebmgithub Thanks for the question. The limit is on the source file. The .NET API has a limitation on the file stream size to the compression.

Does this answer your question?

@sdwheeler sdwheeler added area-archive Area - Microsoft.PowerShell.Archive module and removed area-language Area - PowerShell syntax and keywords labels Dec 20, 2019
@chasewilson
Copy link
Contributor

Closing this issue for now. Feel free to reach out with any questions and concerns

@KalleOlaviNiemitalo
Copy link

Confirmed that Compress-Archive on a 64-bit PowerShell 7.0.0-rc.2 is able to create a 6 GB zip file from many small files, but fails if a single input file is that large, regardless of whether -CompressionLevel NoCompression is used.

MethodInvocationException: C:\program files\powershell\7-preview\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1:845
Line |
 845 |  …                     $destStream.Write($buffer, 0, $numberOfBytesRead)
     |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "Write" with "3" argument(s): "Stream was too long."

A request to remove this limitation has been filed at PowerShell/Microsoft.PowerShell.Archive#19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-archive Area - Microsoft.PowerShell.Archive module issue-question Issue - support question
Projects
None yet
Development

No branches or pull requests

4 participants