/[cvs]/ccvs/src/zlib.c
ViewVC logotype

Diff of /ccvs/src/zlib.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by dprice, Fri Jun 3 18:26:09 2005 UTC revision 1.32 by dprice, Fri Oct 28 14:10:59 2005 UTC
# Line 221  compress_buffer_input (void *closure, ch Line 221  compress_buffer_input (void *closure, ch
221             point.  */             point.  */
222          assert (bd->size == 0);          assert (bd->size == 0);
223    
224          /* This will work well in the server, because this call will          /* On the server, this will do an unblocking read of as much data as is
225             do an unblocked read and fetch all the available data.  In           * available.  On the client, with a blocking input descriptor and the
226             the client, this will read a single byte from the stdio           * current fd_buffer implementation, this should read as much data as
227             stream, which will cause us to call inflate once per byte.           * is currently available, and at least 1 byte (or EOF), from the
228             It would be more efficient if we could make a call which           * underlying buffer.
229             would fetch all the available bytes, and at least one byte.  */           */
   
230          status = (*cb->buf->input) (cb->buf->closure, bd->text,          status = (*cb->buf->input) (cb->buf->closure, bd->text,
231                                      need, BUFFER_DATA_SIZE, &nread);                                      need ? 1 : 0, BUFFER_DATA_SIZE, &nread);
232    
233          if (status == -2)          if (status == -2)
234              /* Don't try to recover from memory allcoation errors.  */              /* Don't try to recover from memory allcoation errors.  */

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26