View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
simonc simonc is offline
external usenet poster
 
Posts: 52
Default Testing for a string of zero bytes

I am reading a series of bytes (around 2000) from a binary file and want the
quickest way to test if all the bytes have a value zero. Would this be by a
string comparison? I'm sure reading the bytes into a byte array and testing
each one individually is NOT the best way. Incidentally I have to repeat this
operation several hundred thousand times so any gain in speed will be
significant.

Grateful for advice.