in reply to Re: Reading a run length encoded file in a buffering scenario
in thread Reading a run length encoded file in a buffering scenario

This will leave any incomplete items in the buffer.

not exactly. more like: if the last item is incomplete, it will remain in the buffer.

there's an important distinction. if any item other than the last in incomplete, every item from the incomplete item to the last item (inclusive) will be corrupt. there may or may not be data remaining in the buffer as well.

~Particle *accelerates*

Replies are listed 'Best First'.
Re: Re^2: Reading a run length encoded file in a buffering scenario
by jmcnamara (Monsignor) on Aug 15, 2002 at 09:03 UTC

    there's an important distinction. if any item other than the last in incomplete, every item from the incomplete item to the last item (inclusive) will be corrupt. there may or may not be data remaining in the buffer as well.

    I think that this comment serves to confuse rather than clarify.

    There is no important distinction to be made here. If the data is corrupt then all decoding schemes will fail.

    If the data isn't corrupt then having the incomplete item remain in the buffer is an advantage. It means that the program can add to the buffer until at least one record is read.

    --
    John.