⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 support.bas

📁 一个兼容pkzip的文件/内存压缩算法
💻 BAS
字号:
' 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


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -