diff options
Diffstat (limited to 'OpenSim/Data/PGSQL')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLXAssetData.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLXAssetData.cs b/OpenSim/Data/PGSQL/PGSQLXAssetData.cs index 6e88489..000a446 100644 --- a/OpenSim/Data/PGSQL/PGSQLXAssetData.cs +++ b/OpenSim/Data/PGSQL/PGSQLXAssetData.cs | |||
@@ -173,13 +173,15 @@ namespace OpenSim.Data.PGSQL | |||
173 | 173 | ||
174 | if (m_enableCompression) | 174 | if (m_enableCompression) |
175 | { | 175 | { |
176 | using (GZipStream decompressionStream = new GZipStream(new MemoryStream(asset.Data), CompressionMode.Decompress)) | 176 | using (GZipStream decompressionStream = new GZipStream( new MemoryStream(asset.Data), |
177 | CompressionMode.Decompress)) | ||
177 | { | 178 | { |
178 | MemoryStream outputStream = new MemoryStream(); | 179 | using(MemoryStream outputStream = new MemoryStream()) |
179 | WebUtil.CopyStream(decompressionStream, outputStream, int.MaxValue); | 180 | { |
181 | WebUtil.CopyStream(decompressionStream,outputStream,int.MaxValue); | ||
180 | // int compressedLength = asset.Data.Length; | 182 | // int compressedLength = asset.Data.Length; |
181 | asset.Data = outputStream.ToArray(); | 183 | asset.Data = outputStream.ToArray(); |
182 | 184 | } | |
183 | // m_log.DebugFormat( | 185 | // m_log.DebugFormat( |
184 | // "[XASSET DB]: Decompressed {0} {1} to {2} bytes from {3}", | 186 | // "[XASSET DB]: Decompressed {0} {1} to {2} bytes from {3}", |
185 | // asset.ID, asset.Name, asset.Data.Length, compressedLength); | 187 | // asset.ID, asset.Name, asset.Data.Length, compressedLength); |