From c90aeda81487b2be9e8a544b7e4cfcbd87fb779b Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 25 Aug 2016 15:00:39 -0700 Subject: [PATCH] [ArchiveTools] Comment update --- SabreTools.Helper/Tools/ArchiveTools.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SabreTools.Helper/Tools/ArchiveTools.cs b/SabreTools.Helper/Tools/ArchiveTools.cs index 58c1ee6c..6225119d 100644 --- a/SabreTools.Helper/Tools/ArchiveTools.cs +++ b/SabreTools.Helper/Tools/ArchiveTools.cs @@ -9,6 +9,11 @@ using System.IO.Compression; using System.Linq; using System.Text.RegularExpressions; +using SharpCompress.Archive.GZip; +using SharpCompress.Common.GZip; +using SharpCompress.Reader.GZip; +using SharpCompress.Writer.GZip; + namespace SabreTools.Helper { public class ArchiveTools @@ -599,6 +604,7 @@ namespace SabreTools.Helper /// True if files should be output in Romba depot folders, false otherwise /// Logger object for file and console output /// True if the write was a success, false otherwise + /// This works for now, but it can be sped up by using Ionic.Zip or another zlib wrapper that allows for header values built-in. See edc's code. public static bool WriteTorrentGZ(string input, string outdir, bool romba, Logger logger) { // Check that the input file exists @@ -627,7 +633,7 @@ namespace SabreTools.Helper inputstream.CopyTo(output); } - // Now that it's renamed, inject the header info + // Now that it's ready, inject the header info using (BinaryWriter sw = new BinaryWriter(new MemoryStream())) { using (BinaryReader br = new BinaryReader(File.OpenRead(outfile)))