Of course, you will not want to do this in safe code if you have a lot of buffer memory, since the encoder will start slowly slowly.
One option is to work with higher permissions, and then you can interact with external COM packages - see http://forums.silverlight.net/forums/p/156112/350144.aspx for some useful links
Here is a link from stackoverflow to a common problem that says almost the same thing - Using native dlls in C # Com shell and using dlls in silverlight
If you can create a C # wrapper around calls in any custom encoding library of your choice, then you can put the wrapper assembly in the GAC and you should be good to go - this, of course, means you need an extra installation step to get this build in gac, which is beyond the βnormalβ Silverlight experience.
To simplify this separation, we introduced what we call simple sandboxing APIs in the .NET Framework 2.0, which create each application domain with a given set of permissions for its sandbox and a complete list of reliable assemblies that are not part of the global assembly cache (GAC ), since all assemblies in the GAC are already fully trusted.
taken from http://msdn.microsoft.com/en-us/magazine/cc765416.aspx - given, but I think itβs still accurate
Mark mullin
source share