diff --git a/src/DotRecast.Core/FastLz.cs b/src/DotRecast.Core/Compression/FastLZ.cs similarity index 99% rename from src/DotRecast.Core/FastLz.cs rename to src/DotRecast.Core/Compression/FastLZ.cs index b3ec9ed..2afd6aa 100644 --- a/src/DotRecast.Core/FastLz.cs +++ b/src/DotRecast.Core/Compression/FastLZ.cs @@ -16,7 +16,7 @@ using System; -namespace DotRecast.Core +namespace DotRecast.Core.Compression { /** * Core of FastLZ compression algorithm. @@ -27,7 +27,7 @@ namespace DotRecast.Core * This is refactored code of jfastlz * library written by William Kinney. */ - public static class FastLz + public static class FastLZ { private const int MAX_DISTANCE = 8191; private const int MAX_FARDISTANCE = 65535 + MAX_DISTANCE - 1; diff --git a/src/DotRecast.Core/DotRecast.Core.csproj b/src/DotRecast.Core/DotRecast.Core.csproj index d727bda..c401255 100644 --- a/src/DotRecast.Core/DotRecast.Core.csproj +++ b/src/DotRecast.Core/DotRecast.Core.csproj @@ -5,4 +5,5 @@ + diff --git a/src/DotRecast.Detour.TileCache/Io/Compress/DtTileCacheFastLzCompressor.cs b/src/DotRecast.Detour.TileCache/Io/Compress/DtTileCacheFastLzCompressor.cs index 42e42a3..4caff89 100644 --- a/src/DotRecast.Detour.TileCache/Io/Compress/DtTileCacheFastLzCompressor.cs +++ b/src/DotRecast.Detour.TileCache/Io/Compress/DtTileCacheFastLzCompressor.cs @@ -19,6 +19,7 @@ freely, subject to the following restrictions: */ using DotRecast.Core; +using DotRecast.Core.Compression; namespace DotRecast.Detour.TileCache.Io.Compress { @@ -28,7 +29,6 @@ namespace DotRecast.Detour.TileCache.Io.Compress private DtTileCacheFastLzCompressor() { - } public byte[] Decompress(byte[] buf) @@ -39,14 +39,14 @@ namespace DotRecast.Detour.TileCache.Io.Compress public byte[] Decompress(byte[] buf, int offset, int len, int outputlen) { byte[] output = new byte[outputlen]; - FastLz.Decompress(buf, offset, len, output, 0, outputlen); + FastLZ.Decompress(buf, offset, len, output, 0, outputlen); return output; } public byte[] Compress(byte[] buf) { - byte[] output = new byte[FastLz.CalculateOutputBufferLength(buf.Length)]; - int len = FastLz.Compress(buf, 0, buf.Length, output, 0, output.Length); + byte[] output = new byte[FastLZ.CalculateOutputBufferLength(buf.Length)]; + int len = FastLZ.Compress(buf, 0, buf.Length, output, 0, output.Length); return RcArrayUtils.CopyOf(output, len); } }