Note: I wish Chrome would fix my spell chek. Sorry everybody =0)
Here's a quick run down of the class.
As most of the property names are self-descriptive I'm not going to go through each one, however an addition could be made to the setter methods of each property to prevent changes during compression.
If we add a private member say _Compressing as a boolean to the Zipper Class and set it to true when the compression method is called and false when the process is finished, doing the following to each setter method will prevent potential errors during the compression process due to a user changing a property.
Private _Source As String
Public Property SourceURL As String
Get
Return _Source
End Get
Set(value As String)
'Add this code
If _Compressing = True Then Exit Property
_Source = value
End Set
End Property
GetSessionLength
Private Function GetSessionLength() As Int64
Dim sLen As Int64 = 0
For Each SessionFile As String In _SessionFiles
sLen += New FileInfo(SessionFile).Length
If Cancel = True Then Exit For
Next
Return sLen
End Function
When the Compression method is called all the files\file paths are added to the List(Of String) _SessionFiles. This method simply iterates through each entry and tallys the total length in bytes of all the files to be read and compressed. This information can later be used to report the current progress of the compression process.
IsDir
…