feat: DotFastLZ

This commit is contained in:
ikpil 2023-10-04 23:05:29 +09:00
parent efb8f8b8ef
commit 72a93f0e73
2 changed files with 554 additions and 584 deletions

File diff suppressed because it is too large Load Diff

View File

@ -45,8 +45,8 @@ namespace DotRecast.Detour.TileCache.Io.Compress
public byte[] Compress(byte[] buf) public byte[] Compress(byte[] buf)
{ {
byte[] output = new byte[FastLZ.CalculateOutputBufferLength(buf.Length)]; byte[] output = new byte[FastLZ.EstimateCompressedSize(buf.Length)];
int len = FastLZ.Compress(buf, 0, buf.Length, output, 0, output.Length); long len = FastLZ.CompressLevel(2, buf, 0, buf.Length, output);
return RcArrayUtils.CopyOf(output, len); return RcArrayUtils.CopyOf(output, len);
} }
} }