diff options
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 18 | ||||
-rw-r--r-- | prebuild.xml | 1 |
2 files changed, 9 insertions, 10 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index 7b13f6a..84df369 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | |||
@@ -43,7 +43,6 @@ using log4net; | |||
43 | using Nini.Config; | 43 | using Nini.Config; |
44 | using System.Reflection; | 44 | using System.Reflection; |
45 | using System.IO; | 45 | using System.IO; |
46 | using ComponentAce.Compression.Libs.zlib; | ||
47 | using System.Runtime.Serialization; | 46 | using System.Runtime.Serialization; |
48 | using System.Runtime.Serialization.Formatters.Binary; | 47 | using System.Runtime.Serialization.Formatters.Binary; |
49 | 48 | ||
@@ -449,22 +448,23 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
449 | { | 448 | { |
450 | using (MemoryStream outMs = new MemoryStream()) | 449 | using (MemoryStream outMs = new MemoryStream()) |
451 | { | 450 | { |
452 | using (ZOutputStream zOut = new ZOutputStream(outMs)) | 451 | using (DeflateStream decompressionStream = new DeflateStream(inMs, CompressionMode.Decompress)) |
453 | { | 452 | { |
454 | byte[] readBuffer = new byte[2048]; | 453 | byte[] readBuffer = new byte[2048]; |
454 | inMs.Read(readBuffer, 0, 2); // skip first 2 bytes in header | ||
455 | int readLen = 0; | 455 | int readLen = 0; |
456 | while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0) | 456 | |
457 | { | 457 | while ((readLen = decompressionStream.Read(readBuffer, 0, readBuffer.Length)) > 0) |
458 | zOut.Write(readBuffer, 0, readLen); | 458 | outMs.Write(readBuffer, 0, readLen); |
459 | } | 459 | |
460 | zOut.Flush(); | 460 | outMs.Flush(); |
461 | outMs.Seek(0, SeekOrigin.Begin); | 461 | outMs.Seek(0, SeekOrigin.Begin); |
462 | 462 | ||
463 | byte[] decompressedBuf = outMs.GetBuffer(); | 463 | byte[] decompressedBuf = outMs.GetBuffer(); |
464 | 464 | ||
465 | decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf); | 465 | decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf); |
466 | } | 466 | } |
467 | } | 467 | } |
468 | } | 468 | } |
469 | } | 469 | } |
470 | catch (Exception e) | 470 | catch (Exception e) |
diff --git a/prebuild.xml b/prebuild.xml index 7bafd78..4415a5c 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1725,7 +1725,6 @@ | |||
1725 | <Reference name="OpenSim.Region.PhysicsModules.SharedBase"/> | 1725 | <Reference name="OpenSim.Region.PhysicsModules.SharedBase"/> |
1726 | <Reference name="OpenSim.Region.Framework"/> | 1726 | <Reference name="OpenSim.Region.Framework"/> |
1727 | <Reference name="OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet"/> | 1727 | <Reference name="OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet"/> |
1728 | <Reference name="zlib.net" path="../../../../bin/"/> | ||
1729 | <Reference name="Mono.Addins" path="../../../../bin/"/> | 1728 | <Reference name="Mono.Addins" path="../../../../bin/"/> |
1730 | <Reference name="log4net" path="../../../../bin/"/> | 1729 | <Reference name="log4net" path="../../../../bin/"/> |
1731 | 1730 | ||