A
Amy L.
Is there a Buffer size that is optimial based on the framework or OS that is
optimal when working with chunks of data? Also, is there a point where the
buffer size might not be optimal (too large)? I am considering an 8K or 16K
Buffer. The files sizes are random but range between 8K - 100K with the
occasional files being several megs.
Example:
int _READBUFFER_ = 1024 ;
fi = new FileInfo( args[ 0 ] ) ;
FileStream fs = fi.OpenRead() ;
while ( fs.Read( ByteArray, 0, _READBUFFER_ ) > 0 )
{
myStringBuilder.Append( textConverter.GetString( ByteArray ) ) ;
}
Thanks,
Amy
optimal when working with chunks of data? Also, is there a point where the
buffer size might not be optimal (too large)? I am considering an 8K or 16K
Buffer. The files sizes are random but range between 8K - 100K with the
occasional files being several megs.
Example:
int _READBUFFER_ = 1024 ;
fi = new FileInfo( args[ 0 ] ) ;
FileStream fs = fi.OpenRead() ;
while ( fs.Read( ByteArray, 0, _READBUFFER_ ) > 0 )
{
myStringBuilder.Append( textConverter.GetString( ByteArray ) ) ;
}
Thanks,
Amy