Re: seek to the end of file
- From: Phil Carmody <thefatphil_demunged@xxxxxxxxxxx>
- Date: 31 Jul 2007 11:39:24 +0300
Joe <divya_krs@xxxxxxxxx> writes:
On Jul 31, 11:35 am, Hans-Peter Diettrich <DrDiettri...@xxxxxxx>
wrote:
Joe wrote:
I would like to find out the size of the gz file using zlib API calls.
For this, I was thinking of calling gzseek () with SEEK_END and then
use gztell(). But unfortunately SEEK_END is not supported. Is there a
way to overcome this?
You'll have to gzread until the end of the stream is reached, summing up
the number of bytes read.
As I understand the zlib, it's a stream format, so that the size of the
stream can not be known before the sender, i.e. inflate(), stops to
provide further data.
DoDi
gzseek returns the resulting offset location in bytes from the
beginning of the uncompressed stream. Even if I get to the end of the
uncompressed stream, I'm fine with that.
Reading until the end of the stream using gzread would be extremely
slow. So I think there should be a better way.
What do you want to do in the case where the single .gz file contains
several concatenated gzipped streams?
Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
.
- References:
- seek to the end of file
- From: Joe
- Re: seek to the end of file
- From: Mark Adler
- Re: seek to the end of file
- From: Joe
- Re: seek to the end of file
- From: Hans-Peter Diettrich
- Re: seek to the end of file
- From: Joe
- Re: seek to the end of file
- From: Hans-Peter Diettrich
- Re: seek to the end of file
- From: Joe
- seek to the end of file
- Prev by Date: Re: seek to the end of file
- Next by Date: Re: using deflateSetDictionary DEFLATE ZLIB
- Previous by thread: Re: seek to the end of file
- Next by thread: Re: seek to the end of file
- Index(es):
Relevant Pages
|
|