static void P(string m) { if (Verbose) { QCol.Cyan("Verbose: "); Console.ResetColor(); Console.WriteLine(m); } }
static void Main(string[] args) { JXSDA.Verbose = true; var packed = JXSDA.Pack(startbuf); var unpacked = JXSDA.Unpack(packed); Console.WriteLine($"Packed attempt done. {startbuf.Length} => {packed.Length} => ({(int)Math.Floor(((double)packed.Length/startbuf.Length)*100)}%)"); if (unpacked != null) { Console.WriteLine($"Unpacking attempt done. {packed.Length}=>{unpacked.Length} (Size check succes: {unpacked.Length==startbuf.Length})"); var s = Encoding.UTF8.GetString(unpacked, 0, unpacked.Length); Console.WriteLine($"<unpacked>\n{s}\n</unpacked>"); } else { QCol.QuickError("Something went wrong in unpacking"); } TrickyDebug.AttachWait(); }
static Program() { QCol.Doing("Reading", PackFile); startbuf = QuickStream.GetFile(PackFile); }