Skip to content

Instantly share code, notes, and snippets.

@sassembla
Last active December 22, 2015 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sassembla/6476436 to your computer and use it in GitHub Desktop.
Save sassembla/6476436 to your computer and use it in GitHub Desktop.
The code of UnityEditor C#. Unity 4.2.x. Run with Mac works. Run with Windows does not works.
public static string Decompress(string s) {
var bytes = Convert.FromBase64String(s);
using (var msi = new MemoryStream(bytes))
using (var mso = new MemoryStream()) {
using (var gs = new GZipStream(msi, CompressionMode.Decompress)) {
CopyStream(gs, mso);
}
return Encoding.Unicode.GetString(mso.ToArray());
}
}
@sassembla
Copy link
Author

System.DllNotFoundException: MonoPosixHelper
will raise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment