I noticed you're using a native library for framed lz4 and a .net implementation for non-framed. I'm guessing that's because you're using this .NET implemenation: https://github.com/MiloszKrajewski/lz4net
at the bottom it talks about how it's not compatible with original lz4..? is that why you have native code for this? I had a go and I couldn't get the .NET implementation working in place of your compiled code.
I can compile the lz4 library fine, but marshalling/unmarshalling byte arrays of variable length between C# and C++ without C++/CLI i'm finding confusing and difficult.
Any suggestions here?