mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:56:54 +02:00
allow Octreee to load compressed gz files
This commit is contained in:
parent
c83dcbc626
commit
d394c891c5
1 changed files with 9 additions and 0 deletions
|
@ -1685,6 +1685,15 @@ bool Octree::readFromURL(const QString& urlString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto data = request->getData();
|
auto data = request->getData();
|
||||||
|
|
||||||
|
QByteArray uncompressedJsonData;
|
||||||
|
bool wasCompressed = gunzip(data, uncompressedJsonData);
|
||||||
|
|
||||||
|
if (wasCompressed) {
|
||||||
|
QDataStream inputStream(uncompressedJsonData);
|
||||||
|
return readFromStream(uncompressedJsonData.size(), inputStream, marketplaceID);
|
||||||
|
}
|
||||||
|
|
||||||
QDataStream inputStream(data);
|
QDataStream inputStream(data);
|
||||||
return readFromStream(data.size(), inputStream, marketplaceID);
|
return readFromStream(data.size(), inputStream, marketplaceID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue