Ethereal-dev: Re: [ethereal-dev] LAPD (the protocol :-)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Wed, 10 Nov 1999 23:51:05 -0600
On Wed, Nov 10, 1999 at 10:01:01PM -0800, Guy Harris wrote:
> > I'm not sure why; perhaps my toshiba reader is just inefficent when
> > combined with zlib.
> 
> Your Toshiba reader looks as if it may do a fair number of seeks.
> 
> Forward seeks are, when reading a compressed file, done, as I remember,
> by reading forward some number of bytes in the file until you get to the
> appropriate position in the file (where that position is in the
> *uncompressed* data stream).  Not necessarily cheap, but no more
> expensive than just reading.
> 
> *Backwards* seeks, however, are, as I remember, done by going back to
> the beginning of the file, and reading forward until you reach the
> appropriate position in the file.  They can be costly....

Thanks for the info. Yes, I was doing a backwards seek (of 4 bytes!)
for every packet found. I got rid of that backwards seek and now
a compressed toshiba trace file loads in a decent amount of time.

BTW, the Ascend file reader does the same (guess who I copied :-),
so it could be sped up by removing thise backward file_seeks.

thanks for the info,

--gilbert