Re: Help reading structured binary files



On 18 Jul 2005 11:01:29 -0700, "Robert Kilroy" <kilroy@xxxxxxxxx>
wrote:

>Ya, as I'm getting deeper into these individual files, I'm finding that
>many are corrupted. I'd say that 40% of the time I don't get my 255-255
>terminator. Obviously I need to get whatever I can out of them, so I
>had to junk the ReadBuffer. WAY too many exceptions to catch. It seemed
>to slow the whole process down. Here is the refined function. (Thanks
>Rob, much speed improvements)

If those files are fairly small then I suggest you read them into
something in one gulp.

Any form of disk accesss is /very/ slow

Personally I would read it into a String, then probably use a
pre-created TStringStream
.