aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2019-04-01 18:12:17 +0100
committerUbitUmarov2019-04-01 18:12:17 +0100
commit2739b2f5cc633cb9d292b037a03c160be749777e (patch)
tree416e56273d0106f54e8810db7f5074d71826a4a9 /OpenSim
parentYengine: try fix changing scripts running state if the have long events (diff)
downloadopensim-SC-2739b2f5cc633cb9d292b037a03c160be749777e.zip
opensim-SC-2739b2f5cc633cb9d292b037a03c160be749777e.tar.gz
opensim-SC-2739b2f5cc633cb9d292b037a03c160be749777e.tar.bz2
opensim-SC-2739b2f5cc633cb9d292b037a03c160be749777e.tar.xz
mantis 8509: replace mesh gzip decompress
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
index 8844a0f..adc8298 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
@@ -40,7 +40,7 @@ using OpenSim.Region.Framework;
40using OpenSim.Region.Framework.Scenes; 40using OpenSim.Region.Framework.Scenes;
41using OpenSim.Framework.Capabilities; 41using OpenSim.Framework.Capabilities;
42 42
43using ComponentAce.Compression.Libs.zlib; 43using System.IO.Compression;
44 44
45using OSDArray = OpenMetaverse.StructuredData.OSDArray; 45using OSDArray = OpenMetaverse.StructuredData.OSDArray;
46using OSDMap = OpenMetaverse.StructuredData.OSDMap; 46using OSDMap = OpenMetaverse.StructuredData.OSDMap;
@@ -571,15 +571,15 @@ namespace OpenSim.Region.ClientStack.Linden
571 { 571 {
572 using (MemoryStream outMs = new MemoryStream()) 572 using (MemoryStream outMs = new MemoryStream())
573 { 573 {
574 using (ZOutputStream zOut = new ZOutputStream(outMs)) 574 using (DeflateStream decompressionStream = new DeflateStream(inMs, CompressionMode.Decompress))
575 { 575 {
576 byte[] readBuffer = new byte[4096]; 576 byte[] readBuffer = new byte[2048];
577 inMs.Read(readBuffer, 0, 2); // skip first 2 bytes in header
577 int readLen = 0; 578 int readLen = 0;
578 while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0) 579
579 { 580 while ((readLen = decompressionStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
580 zOut.Write(readBuffer, 0, readLen); 581 outMs.Write(readBuffer, 0, readLen);
581 } 582
582 zOut.Flush();
583 outMs.Seek(0, SeekOrigin.Begin); 583 outMs.Seek(0, SeekOrigin.Begin);
584 584
585 byte[] decompressedBuf = outMs.GetBuffer(); 585 byte[] decompressedBuf = outMs.GetBuffer();
@@ -638,15 +638,15 @@ namespace OpenSim.Region.ClientStack.Linden
638 { 638 {
639 using (MemoryStream outMs = new MemoryStream()) 639 using (MemoryStream outMs = new MemoryStream())
640 { 640 {
641 using (ZOutputStream zOut = new ZOutputStream(outMs)) 641 using (DeflateStream decompressionStream = new DeflateStream(inMs, CompressionMode.Decompress))
642 { 642 {
643 byte[] readBuffer = new byte[4096]; 643 byte[] readBuffer = new byte[2048];
644 inMs.Read(readBuffer, 0, 2); // skip first 2 bytes in header
644 int readLen = 0; 645 int readLen = 0;
645 while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0) 646
646 { 647 while ((readLen = decompressionStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
647 zOut.Write(readBuffer, 0, readLen); 648 outMs.Write(readBuffer, 0, readLen);
648 } 649
649 zOut.Flush();
650 outMs.Seek(0, SeekOrigin.Begin); 650 outMs.Seek(0, SeekOrigin.Begin);
651 651
652 byte[] decompressedBuf = outMs.GetBuffer(); 652 byte[] decompressedBuf = outMs.GetBuffer();