Re: The security of deflate-compressed streams with uncompressed-length field

John Bowler <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CAP7U399A5Z_TWUHOcVFG_VUEihFotYcJxQDZjhGxvxmZszAX-w@mail.gmail.com>
On Sun, Feb 5, 2017 at 11:10 AM, Cosmin Truta <[email protected]> wrote:
> On 5 February 2017 at 12:34, John Bowler
> <[email protected]> wrote:
>> [I]it is not
>> possible to write a streaming conversion of compressed PNG data unless
>> the output PNG chunk size can be calculated before the output chunk
>> header has to be written.
>
> I'm not "missing" anything. It _is_ possible to do it,

Eh?  PNG chunk header:

[length]
[chunk-type]

How, in a streaming implementation, do you write this *without*
knowing the value of "length".  (I know how to do it in a
non-streaming implementation; I worded the above sentence very
carefully.)

> and it has been
> done, by the means of dynamically-allocated arrays. It only looks
> complicated from a C programmer perspective,

I think you do not understand the meaning of the word "streaming" as
used traditionally in PNG discussions.  Streaming means *NOT*
buffering.  Buffering the whole chunk is not streaming, regardless of
how you obscure the buffering.

John Bowler

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.