public static void Decompress(LZOMethod method, byte* src, IntPtr srcLen, byte* dst, IntPtr* dstLen) { int ret; switch (method) { case LZOMethod.M1x15: case LZOMethod.M1x999: ret = lzo1x_decompress(src, srcLen, dst, dstLen, null); break; default: throw new ArgumentException("Unknow method: " + method); } if (ret != 0) throw new LZOException(ret); }
public static void Compress(LZOMethod method, byte* src, IntPtr srcLen, byte* dst, IntPtr* dstLen, void* wrkMem) { int ret; switch (method) { case LZOMethod.M1x15: ret = lzo1x_1_15_compress(src, srcLen, dst, dstLen, wrkMem); break; case LZOMethod.M1x999: ret = lzo1x_999_compress(src, srcLen, dst, dstLen, wrkMem); break; default: throw new ArgumentException("Unknow method: " + method); } if (ret != 0) throw new LZOException(ret); }
public static void Decompress(LZOMethod method, byte *src, IntPtr srcLen, byte *dst, IntPtr *dstLen) { int ret; switch (method) { case LZOMethod.M1x15: case LZOMethod.M1x999: ret = lzo1x_decompress(src, srcLen, dst, dstLen, null); break; default: throw new ArgumentException("Unknow method: " + method); } if (ret != 0) { throw new LZOException(ret); } }