std.zip expand: memory allocation failed

Imperatorn johan_forsberg_86 at hotmail.com
Tue Oct 26 18:19:19 UTC 2021


On Tuesday, 26 October 2021 at 17:38:22 UTC, Imperatorn wrote:
> On Tuesday, 26 October 2021 at 13:43:36 UTC, Steven 
> Schveighoffer wrote:
>> On 10/26/21 2:32 AM, bauss wrote:
>>> On Monday, 25 October 2021 at 22:38:38 UTC, Imperatorn wrote:
>>>> [...]
>>> 
>>> Definitely not. It shouldn't use a lot of memory when 
>>> unzipping as it should be done in chunks!
>>
>> You guys aren't getting it:
>>
>> ```
>> ubyte[] expand(ArchiveMember de);
>> Decompress the contents of a member.
>> Fills in properties extractVersion, flags, compressionMethod, 
>> time, crc32, compressedSize, expandedSize, expandedData[], 
>> name[], extra[].
>> ```
>>
>> Where is it supposed to store that `ubyte[]`?
>>
>> -Steve
>
> That's the current implementation.
>
> I don't know about *nix, but my Windows machine can easily 
> extract a file bigger than my RAM.
>
> It ofc also depends on the dictionary.

The biggest file I've ever decompressed on my own hardware was 
about 200 GB.

Needless to say, it wasn't using the algorithm in std.zip


More information about the Digitalmars-d-learn mailing list