0
Answer

How to use LZO.dll

subhajit bhadury

subhajit bhadury

17y
3.8k
1
Hi all, Iam using lzo.dll in C#.net project. Code is

public byte[] Decompress(byte[] src) {
            if(_traceSwitch.TraceVerbose) {
                Trace.WriteLine(String.Format("LZOCompressor: trying to decompress {0}", src.Length));
            }
            int origlen = BitConverter.ToInt32(src, src.Length - 4);
            byte[] dst = new byte[origlen];
            int outlen = 600;
            lzo1x_decompress(src, (src.Length - 4), dst, ref outlen, _workMemory);
            if(_traceSwitch.TraceVerbose) {
                Trace.WriteLine(String.Format("LZOCompressor: decompressed {0} to {1} bytes", src.Length, origlen));
            }
            return dst;

}
but when i call this function its giving an error
 'System.ExecutionEngineException' ......and stick on the line "lzo1x_decompress(src, (src.Length - 4), dst, ref outlen, _workMemory);"

Plzz help me to solve this.