On 2021-02-05 Brett Okken wrote:
> > > Now that there is a 6 byte chunkHeader, could the 1 byte tempBuf
> > > be removed?  
> >
> > It's better to keep it. It would be confusing to use the same
> > buffer in write(int) and writeChunk(). At glance it would look like
> > that writeChunk() could be overwriting the input.  
> 
> I assumed that lz.fillWindow(buf, off, len); would always process the
> 1 byte.

Yes, but it's not immediately obvious to a new reader. Also, many other
classes have tempBuf for identical use so it's good to keep that pattern
consistent.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

Reply via email to