home *** CD-ROM | disk | FTP | other *** search
- ' Support routines for addZIP Compression routines
- '
- '
-
- Function GetAction(cFrom As String) As Integer
- GetAction = Val(GetPiece(cFrom, "|", 2))
- End Function
-
- Function GetFileCompressedSize(cFrom As String) As Long
- GetFileCompressedSize = Val(GetPiece(cFrom, "|", 6))
- End Function
-
- Function GetFileCompressionRatio(cFrom As String) As Integer
- GetFileCompressionRatio = Val(GetPiece(cFrom, "|", 7))
- End Function
- Function GetPercentComplete(cFrom As String) As Integer
- GetPercentComplete = Val(GetPiece(cFrom, "|", 7))
- End Function
-
- Function GetFileName(cFrom As String) As String
- GetFileName = GetPiece(cFrom, "|", 4)
- End Function
-
- Function GetFileOriginalSize(cFrom As String) As Long
- GetFileOriginalSize = Val(GetPiece(cFrom, "|", 5))
- End Function
-
- Function GetPiece(from As String, delim As String, Index As Integer) As String
- Dim temp$
- Dim Count As Integer
- Dim Where As Integer
- '
- temp$ = from & delim
- Where = InStr(temp$, delim)
- Count = 0
- Do While (Where > 0)
- Count = Count + 1
- If (Count = Index) Then
- GetPiece = Left$(temp$, Where - 1)
- Exit Function
- End If
- temp$ = Right$(temp$, Len(temp$) - Where)
- Where = InStr(temp$, delim)
- Loop
- If (Count = 0) Then
- GetPiece = from
- Else
- GetPiece = ""
- End If
- End Function
-
-
-