This project is read-only.

Why doesn't ZipProgressEventType.Saving_AfterWriteEntry give me the BytesTransferred property?

Nov 6, 2009 at 12:03 AM
Edited Nov 6, 2009 at 12:17 AM

Is it normal? It returns always the zero value, so I think that it could be a bug.

This is my code:

void ZipSaveProgress(object sender, SaveProgressEventArgs e)
switch (e.EventType)
case ZipProgressEventType.Saving_AfterWriteEntry:
case ZipProgressEventType.Saving_Completed:

private void StepArchiveProgressBackup(SaveProgressEventArgs e)
if (this.progressBar1.InvokeRequired)
this.progressBar1.Invoke(new BackupEntryProgress(this.StepArchiveProgressBackup), new object[] { e });
//MessageBox.Show(e.CurrentEntry.FileName.ToString() + " " + (e.BytesTransferred).ToString() + " progressbar value: " + this.progressBar1.Value.ToString());




Nov 6, 2009 at 1:34 AM
Edited Nov 6, 2009 at 5:53 AM

Hey Alex,

the BytesTransferred is intended for use with the event type == ZipProgressEventType.Saving_EntryBytesRead.

If you want to know the size of the entry, either before or after comression, you have the CurrentEntry property on the SaveProgressEventArgs parameter.  Within CurrentEntry is CompressedSize and UncompressedSize.  Those will be accurate and up-to-date during an event call with the type == ZipProgressEventType.Saving_AfterWriteEntry.


Nov 6, 2009 at 10:56 AM

Yes, excuse me, but I didn't see the UncompressedSize property. Now all it's ok, many thanks!