mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
*** empty log message ***
This commit is contained in:
parent
6952b46db5
commit
35ff932d6e
@ -25,6 +25,10 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
Decompressor::
|
||||
Decompressor(void) {
|
||||
if (downloader_cat.is_debug())
|
||||
downloader_cat.debug()
|
||||
<< "Decompressor::constructor() - Creating buffer of size: "
|
||||
<< decompressor_buffer_size << endl;
|
||||
PT(Buffer) buffer = new Buffer(decompressor_buffer_size);
|
||||
init(buffer);
|
||||
}
|
||||
@ -163,6 +167,11 @@ run(void) {
|
||||
int avail_out = dest_buffer_length;
|
||||
nassertr(avail_out > 0 && avail_in > 0, false);
|
||||
|
||||
if (downloader_cat.is_debug())
|
||||
downloader_cat.debug()
|
||||
<< "Decompressor::run() - avail_in: " << avail_in << " avail_out: "
|
||||
<< avail_out << endl;
|
||||
|
||||
while (avail_in > 0) {
|
||||
int ret = _decompressor->decompress_to_stream(next_in, avail_in,
|
||||
next_out, avail_out, dest_buffer,
|
||||
@ -170,7 +179,7 @@ run(void) {
|
||||
if (ret == ZCompressorBase::S_error)
|
||||
return DS_error_zlib;
|
||||
if ((int)_decompressor->get_total_in() == _source_file_length &&
|
||||
avail_out == dest_buffer_length)
|
||||
avail_out == dest_buffer_length) {
|
||||
_read_stream.close();
|
||||
_write_stream.close();
|
||||
_source_file.unlink();
|
||||
@ -178,6 +187,7 @@ run(void) {
|
||||
_decompressor = NULL;
|
||||
return DS_success;
|
||||
}
|
||||
}
|
||||
|
||||
return DS_ok;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user