Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public ReportLog()
byte[] uncompBytes;
using (var file = File.OpenRead(path))
using (var compStrm = new GZipStream(file, CompressionMode.Decompress))
uncompBytes = new byte[file.Length];
var strm = new MemoryStream();
strm.Read(uncompBytes, 0, (int)compStrm.Length);
log = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogItem>>(Encoding.UTF8.GetString(uncompBytes));
if (log == null)
log = new List<LogItem>();
GlobalInfo.PostsCaught += log.Count;
writer = new Thread(UpdateLog);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.