Are you new to Unity? Do you need this to be production ready? Cos 2017.1 has support for C#6 and .NET 4.6 (although its marked as experimental; I personally haven’t had any issues with it but YMMV. Also, they said builds will be bigger since they haven’t got their code stripping done for it yet.)
Also, are you certain that this code won’t work in Unity? Cos although normal Unity is .NET 2.0, it has the equivalent feature set of .NET 3.5
The new thing there is “readonly”, but you can fake it a different way - by defining a getter but not a setter. It needs more setup so the simple solution to just make the line valid is removing the keyword. But yes, simply using 2017.1 gives you C# 6.0 and .NET 4.6, making life a lot easier.
My program is being written for android so I don’t really want larger size if I can help it.
Here is a post to the entire project I am trying to port over.
The part I am having problem with is in EncodeSetup.cs