Home » U++ Library support » U++ Core » GZDecompress bug
Re: GZDecompress bug [message #22691 is a reply to message #22687] |
Wed, 05 August 2009 17:17   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
luzr wrote on Wed, 05 August 2009 02:49 |
int GZDecompress(Stream& out, Stream& in, int size, Gate2<int, int> progress)
Here the 'size' parameter is a number of bytes to be read from in.
The size of .gz is 75 bytes, but you put there 48.
|
GZDecompress(index_stream, in, in.GetSize());
Thanks! That helped. I was confused by the name “size”. IMO there was no need to provide size of the input stream because it can be easily retrieved from the input stream. The only useful size I could imagine in this situation was a minimal size of the output stream (to avoid multiple reallocations).
A few lines of documentation would help me a lot in this situation.
Quote: |
BTW, why MemStream? You can use 'out' as output directly without CopyStream.
Mirek
|
This is just a testing application. In a real application I keep uncompressed data in memory.
Another alternative to MemStream would be StringStream, but it wouldn’t let me to reserve initial buffer (what seems to be a good idea), and I’d like to avoid multiple reallocations.
Thanks a lot for your help!
Regards,
Novo
|
|
|
 |
|
GZDecompress bug
By: Novo on Tue, 04 August 2009 05:49
|
 |
|
Re: GZDecompress bug
By: mirek on Tue, 04 August 2009 20:05
|
 |
|
Re: GZDecompress bug
By: Novo on Wed, 05 August 2009 05:40
|
 |
|
Re: GZDecompress bug
By: mirek on Wed, 05 August 2009 08:23
|
 |
|
Re: GZDecompress bug
By: mirek on Wed, 05 August 2009 08:49
|
 |
|
Re: GZDecompress bug
By: Novo on Wed, 05 August 2009 17:17
|
 |
|
Re: GZDecompress bug
By: mirek on Wed, 05 August 2009 17:26
|
 |
|
Re: GZDecompress bug
By: Novo on Wed, 05 August 2009 19:16
|
 |
|
Re: GZDecompress bug
By: mirek on Wed, 05 August 2009 20:21
|
 |
|
Re: GZDecompress bug
By: Novo on Wed, 12 August 2009 04:34
|
 |
|
Re: GZDecompress bug
By: mirek on Wed, 12 August 2009 09:25
|
 |
|
Re: GZDecompress bug
By: Novo on Fri, 14 August 2009 06:07
|
Goto Forum:
Current Time: Wed May 14 16:51:51 CEST 2025
Total time taken to generate the page: 0.02362 seconds
|