public static void writeCompressedHex(string fileName) { byte[] unc = read(fileName); Gzip.Compress(fileName + ".temp", unc); byte[] compressed = Gzip.read(fileName + ".temp"); string res = "0x" + BitConverter.ToString(compressed).Replace("-", ",0x"); write(fileName + ".compressed", System.Text.Encoding.ASCII.GetBytes(res)); }
private void load(string fileName) { if (fileName.EndsWith(".sav", StringComparison.InvariantCultureIgnoreCase)) { this.Title = originalTitle + " - " + fileName.Split('\\').Last(); rawData = Gzip.Decompress(fileName); #if WriteSOTS Gzip.write(fileName.Substring(0, fileName.Length - 4) + ".SOTS", rawData); #endif } else { rawData = Gzip.read(fileName); } parse(); }