Skip to content

Instantly share code, notes, and snippets.

@tiernano
Created December 12, 2012 11:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiernano/4267157 to your computer and use it in GitHub Desktop.
Save tiernano/4267157 to your computer and use it in GitHub Desktop.
take a compressed protobuf file (local), uncompress and then deserialize
using (FileStream fs = new FileStream(location, FileMode.Open))
{
using (GZipStream gz = new GZipStream(fs, CompressionMode.Decompress))
{
var result = Serializer.Deserialize<objectType>(gz);
//work with result here...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment