From 387e9f7a7faeb412054383080afc3507a1522746 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 2 Oct 2009 18:31:08 -0700 Subject: * Creates Util.UTF8 and switches some references of Encoding.UTF8 to Util.UTF8 (not all references were switched since not all OpenSim libraries reference OpenSim.Framework) * Shrinks the largest in-memory object, the LLRAW.HeightmapLookupValue struct (only used for exporting to LLRAW terrain files), to the minimum possible size. This seems to have the odd side effect of cutting the size of the two double[256,256] terrain objects in half. Possibly an alignment optimization? --- OpenSim/Framework/Capabilities/LLSD.cs | 4 ++-- OpenSim/Framework/Capabilities/LLSDStreamHandler.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Capabilities') diff --git a/OpenSim/Framework/Capabilities/LLSD.cs b/OpenSim/Framework/Capabilities/LLSD.cs index 84f43c1..eec9e61 100644 --- a/OpenSim/Framework/Capabilities/LLSD.cs +++ b/OpenSim/Framework/Capabilities/LLSD.cs @@ -112,7 +112,7 @@ namespace OpenSim.Framework.Capabilities writer.Close(); - return Encoding.UTF8.GetBytes(sw.ToString()); + return Util.UTF8.GetBytes(sw.ToString()); } /// @@ -329,7 +329,7 @@ namespace OpenSim.Framework.Capabilities reader.Read(); FromBase64Transform b64 = new FromBase64Transform(FromBase64TransformMode.IgnoreWhiteSpaces); - byte[] inp = Encoding.UTF8.GetBytes(reader.ReadString()); + byte[] inp = Util.UTF8.GetBytes(reader.ReadString()); ret = b64.TransformFinalBlock(inp, 0, inp.Length); break; } diff --git a/OpenSim/Framework/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Capabilities/LLSDStreamHandler.cs index df48b35..7aaa994 100644 --- a/OpenSim/Framework/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Capabilities/LLSDStreamHandler.cs @@ -47,7 +47,7 @@ namespace OpenSim.Framework.Capabilities public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { - //Encoding encoding = Encoding.UTF8; + //Encoding encoding = Util.UTF8; //StreamReader streamReader = new StreamReader(request, false); //string requestBody = streamReader.ReadToEnd(); -- cgit v1.1