public unsafe byte[] Decompress(byte[] bytes)
{
if (bytes == null || bytes.Length < 4)
return new byte[0];
int decompressedSize = 0;
fixed (byte* bytesPtr = bytes)
{
decompressedSize = *((int*)bytesPtr);
}
return LZ4n.LZ4Codec.Decode32(bytes, 4, bytes.Length - 4, decompressedSize);
}