mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:43:41 +02:00
Merge pull request #21 from druiz17/serverless-domains
allow Octree to load compressed gz files
This commit is contained in:
commit
7974857cea
1 changed files with 9 additions and 0 deletions
|
@ -1685,6 +1685,15 @@ bool Octree::readFromURL(const QString& urlString) {
|
|||
}
|
||||
|
||||
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);
|
||||
return readFromStream(data.size(), inputStream, marketplaceID);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue