void IReaderExtractionListener.FireEntryExtractionEnd(SharpCompress.Common.Entry entry)
 {
     if (this.EntryExtractionEnd != null)
     {
         this.EntryExtractionEnd(this, new ReaderExtractionEventArgs <IEntry>(entry));
     }
 }
Beispiel #2
0
        public static long TransferTo(this Stream source, Stream destination, Common.Entry entry, IReaderExtractionListener readerExtractionListener)
        {
            byte[] array = GetTransferByteArray();
            int    count;
            var    iterations = 0;
            long   total      = 0;

            while (ReadTransferBlock(source, array, out count))
            {
                total += count;
                destination.Write(array, 0, count);
                iterations++;
                readerExtractionListener.FireEntryExtractionProgress(entry, total, iterations);
            }
            return(total);
        }