www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22436] New: std.zip expand: memory allocation failed


          Issue ID: 22436
           Summary: std.zip expand: memory allocation failed
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: sozel wpi.edu

I wrote about this zip/memory issue in the forums too [1].

Here's some part of the description:

"It turns out my computer was literally running out of memory as the file was
getting unzipped. For some reason to uncompress a 1-gig file with uncompressed
size of 4-gig, Zip Archive of D-Lang tries to use more than 16 gig of RAM. I
don't know why. Maybe I missed something. I use a Windows 10, DMD v2.091 with

My work around was to call 7z from D Lang and do the compression over there.
That worked like a charm.

It seems that zip.d [1] calls uncompress routine from zlib.d [2]. Would calling
zlib uncompress by chunks solve this memory issue? Any ideas?"

[1] https://forum.dlang.org/post/xyyxbatsdaamidodmyrd forum.dlang.org

Oct 25 2021