def _feed_stream(feeder, in_stream, out_stream, block_size=BLOCK_SIZE):
 while True:
  chunk = in_stream.read(block_size)
  if (not chunk):
   break
  converted = feeder.feed(chunk)
  out_stream.write(converted)
 converted = feeder.feed()
 out_stream.write(converted)

def _feed_stream ( feeder , in_stream , out_stream , block_size = BLOCK_SIZE ) : while True : chunk = in_stream . read ( block_size ) if ( not chunk ) : break converted = feeder . feed ( chunk ) out_stream . write ( converted ) converted = feeder . feed ( ) out_stream . write ( converted )
uses feeder to read and convert from in_stream and write to out_stream .