POV-Ray : Newsgroups : povray.off-topic : Bloatware : Re: Bloatware Server Time
29 Jul 2024 10:17:24 EDT (-0400)
  Re: Bloatware  
From: Invisible
Date: 1 Nov 2011 04:54:24
Message: <4eafb3c0$1@news.povray.org>
On 31/10/2011 05:36 PM, Warp wrote:
> Invisible<voi### [at] devnull>  wrote:
>> I had expected the zlib itself merely takes a pointer to a buffer full
>> of data, and a pointer to an empty buffer, and moves data from one to
>> the other, compressing or decompressing as requested. I'm surprised it
>> actually implements anything as high-level as file access.
>
>    If the data you are decompressing doesn't fit into RAM, how are you
> supposed to decompress it? (Answer: By streaming. In other words,
> decompress small parts at a time. This requires more than one simple
> "decompress this" function.)

As I say, I would have expected a function that takes two buffers, and 
then returns some sort of indication of how much data it processed. You 
can then call it again to process the next chunk. The only really tricky 
bit is flushing the end of the stream.

But yeah, I guess that might be complicated enough to merit having 
functions especially for the common case of wanting to compress a file 
on disk...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.