diff options
author | Melanie | 2013-12-07 01:19:20 +0000 |
---|---|---|
committer | Melanie | 2013-12-07 01:19:20 +0000 |
commit | ba48816fb676d17298e03e82579fc4f54fa48800 (patch) | |
tree | cfa25ad1116eb0f7bd42eb2d2ebecf19eae939e8 /OpenSim/Region/Physics/Meshing | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-ba48816fb676d17298e03e82579fc4f54fa48800.zip opensim-SC-ba48816fb676d17298e03e82579fc4f54fa48800.tar.gz opensim-SC-ba48816fb676d17298e03e82579fc4f54fa48800.tar.bz2 opensim-SC-ba48816fb676d17298e03e82579fc4f54fa48800.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index e92ae50..6938e55 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -40,7 +40,6 @@ using log4net; | |||
40 | using Nini.Config; | 40 | using Nini.Config; |
41 | using System.Reflection; | 41 | using System.Reflection; |
42 | using System.IO; | 42 | using System.IO; |
43 | using ComponentAce.Compression.Libs.zlib; | ||
44 | 43 | ||
45 | namespace OpenSim.Region.Physics.Meshing | 44 | namespace OpenSim.Region.Physics.Meshing |
46 | { | 45 | { |
@@ -549,7 +548,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
549 | return true; | 548 | return true; |
550 | } | 549 | } |
551 | 550 | ||
552 | |||
553 | /// <summary> | 551 | /// <summary> |
554 | /// decompresses a gzipped OSD object | 552 | /// decompresses a gzipped OSD object |
555 | /// </summary> | 553 | /// </summary> |
@@ -564,15 +562,17 @@ namespace OpenSim.Region.Physics.Meshing | |||
564 | { | 562 | { |
565 | using (MemoryStream outMs = new MemoryStream()) | 563 | using (MemoryStream outMs = new MemoryStream()) |
566 | { | 564 | { |
567 | using (ZOutputStream zOut = new ZOutputStream(outMs)) | 565 | using (DeflateStream decompressionStream = new DeflateStream(inMs, CompressionMode.Decompress)) |
568 | { | 566 | { |
569 | byte[] readBuffer = new byte[2048]; | 567 | byte[] readBuffer = new byte[2048]; |
568 | inMs.Read(readBuffer, 0, 2); // skip first 2 bytes in header | ||
570 | int readLen = 0; | 569 | int readLen = 0; |
571 | while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0) | 570 | |
572 | { | 571 | while ((readLen = decompressionStream.Read(readBuffer, 0, readBuffer.Length)) > 0) |
573 | zOut.Write(readBuffer, 0, readLen); | 572 | outMs.Write(readBuffer, 0, readLen); |
574 | } | 573 | |
575 | zOut.Flush(); | 574 | outMs.Flush(); |
575 | |||
576 | outMs.Seek(0, SeekOrigin.Begin); | 576 | outMs.Seek(0, SeekOrigin.Begin); |
577 | 577 | ||
578 | byte[] decompressedBuf = outMs.GetBuffer(); | 578 | byte[] decompressedBuf = outMs.GetBuffer(); |