none
ZipPackage - Size limits? When does compression take place? RRS feed

  • Question

  • I am rewriting some backup/restore code in one of our products that used to use Compound Documents. I am evaluating using ZipPackage in the new code as it's built into the framework. Two questions I have that I can't seem to find answers to.

    1. Are there any size limits in dealing with ZipPackage? We have clients that have backups that are 4GB or more. Huge backups. Are there any explicit limits to dealing with data in the ZipPackage classes?

    2. When exactly does compression take place? For example let's say I create 3 PackageParts, do they get compressed on the fly somehow? Are all three compressed when I call Flush()? Or on Close()? I just can't find any specifics as to when the compression takes place.

    Monday, January 19, 2015 2:17 PM

Answers

  • Hello Jim,

    >> 1. Are there any size limits in dealing with ZipPackage? We have clients that have backups that are…
    For this ZipPackage class, there is not an explicitly limits for this file size which means that you can compress a file as large as you want. However, here are some information might have effect for the compressed file, if your computer is one of them:

    •Microsoft Windows XP Professional

    •Microsoft Windows XP Home Edition

    •Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)

    •Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)

    •Microsoft Windows Server 2003, Standard x64 Edition

    •Microsoft Windows Server 2003, Standard Edition (32-bit x86)

    You need to check this KB article:

    Compressed folder becomes corrupted when larger than 2 gigabytes

    >> 2. When exactly does compression take place? For example let's say I create 3 PackageParts, do they…

    Since I do not know how you write the code, in my experience, the compression takes place when the partstream is created by the Package.CreatePart Method (Uri, String, CompressionOption) and is compressed with the specific option:

    CompressionOption Enumeration, if you choice the NotCompressed, it actually does not compress the documents.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 20, 2015 2:42 AM
    Moderator