亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? comp_groupsmart2.bas

?? 網上收集的多種加密解密以及壓縮算法vb源碼。
?? BAS
?? 第 1 頁 / 共 2 頁
字號:
Attribute VB_Name = "Comp_GroupSmart2"


Option Explicit

'This is a 1 run method but we have to keep the whole contents
'in memory until some variables are saved wich are needed bij the decompressor

Private ExtraLengthBits(31) As Integer
Private StartValLength(31) As Long

Private Type BytePos
    Data() As Byte
    Position As Long
    Buffer As Integer
    BitPos As Integer
End Type
Private Stream(3) As BytePos    '0=control   1=length  2=LowestValue  3=compressed

Private Type Grouping
    LowValue As Long
    HighValue As Long
    NumInGroup As Long
End Type
   
Private Sub Init_Grouping2()
'                            Distance Codes
'                            --------------
'      Extra           Extra             Extra               Extra
' Code Bits Dist  Code Bits  Dist   Code Bits Distance  Code Bits Distance
' ---- ---- ----  ---- ---- ------  ---- ---- --------  ---- ---- --------
'   0   0    1      8   3   17-24    16    7  257-384    24   11  4097-6144
'   1   0    2      9   3   25-32    17    7  385-512    25   11  6145-8192
'   2   0    3     10   4   33-48    18    8  513-768    26   12  8193-12288
'   3   0    4     11   4   49-64    19    8  769-1024   27   12 12289-16384
'   4   1   5,6    12   5   65-96    20    9 1025-1536   28   13 16385-24576
'   5   1   7,8    13   5   97-128   21    9 1537-2048   29   13 24577-32767
'   6   2   9-12   14   6  129-192   22   10 2049-3072   30   14 32768-49151
'   7   2  13-16   15   6  193-256   23   10 3073-4096   31   14 49152-65535
    
    Dim NuVal As Long
    Dim BitTel As Integer
    Dim Nubits As Integer
    Dim StartBitTel As Boolean
    Dim X As Integer
    ExtraLengthBits(0) = 0: StartValLength(0) = 0
    ExtraLengthBits(1) = 0: StartValLength(1) = 1
    NuVal = 2
    Nubits = 0
    BitTel = 0
    For X = 2 To 31
        If BitTel = 2 Then Nubits = Nubits + 1: BitTel = 0
        ExtraLengthBits(X) = Nubits
        StartValLength(X) = NuVal
        NuVal = NuVal + 2 ^ Nubits
        BitTel = BitTel + 1
    Next
    For X = 0 To 3
        ReDim Stream(X).Data(500)
        Stream(X).Position = 0
        Stream(X).BitPos = 0
        Stream(X).Buffer = 0
    Next
End Sub

Public Sub Compress_SmartGrouping2(ByteArray() As Byte)
    Dim OutStream() As Byte         'The output array
    Dim BeginGroup As Long          'Start for the next bytes wich will be compressed
    Dim BestGroup As Integer        'Best grouping method to get the best result
    Dim NewBest As Integer          'used to check if there is maybe a better method
    Dim BitsDeep As Integer         'This is used as a dummy
    Dim X As Long
    Dim Y As Long
    Dim TotFileLen As Long          'total file len
    Dim Group(1 To 8) As Grouping
    TotFileLen = UBound(ByteArray)
    ReDim OutStream(TotFileLen + (TotFileLen / 7))  'in het slechtste geval
    BeginGroup = 0
'whe start by setting the beginvalues
    Call Init_Grouping2
'lets check if we have done the whole file
    Do While BeginGroup < TotFileLen
        Group(8).LowValue = 0
        Group(8).HighValue = 255
        Group(8).NumInGroup = TotFileLen - BeginGroup + 1
'If where nor ready yet whe assume the best method of compression is no compression
'That is indeed the best method cause nocompression needs 9 additional bits and compression uses 17
        BestGroup = 8
'lets check if there is maybe a better way
        NewBest = CheckForBetterWithin2(ByteArray, Group, BestGroup, BeginGroup)
        Do While BestGroup <> NewBest
'yes there is, lets check again to be shure
            BestGroup = NewBest
            NewBest = CheckForBetterWithin2(ByteArray, Group, BestGroup, BeginGroup)
        Loop
'whe have found the best method
        If BestGroup = 8 Then
            BitsDeep = 0            'No compression
        Else
            BitsDeep = BestGroup
        End If
'here we will store the header in into the outputstream
        Call AddGroupCodeToStream2(Group(BestGroup).NumInGroup, BitsDeep)
'If we have found compression then we must store also the lowest value of the group
'opslaan minimum waarde van de groep
        If BestGroup <> 8 Then
            Call AddLowValueToStream(Group(BestGroup).LowValue)
        End If
'here we will read the bytes from the inputstream, convert them, and store them
'into the output stream
        For X = BeginGroup To BeginGroup + Group(BestGroup).NumInGroup - 1
            Call AddLiteralCodeToStream(CLng(ByteArray(X) - Group(BestGroup).LowValue), BestGroup)
        Next
        BeginGroup = BeginGroup + Group(BestGroup).NumInGroup
    Loop
'if the grouping part is complete we have to store the EOF-marker = 0
'0 = no compression ,marker for less than 8 bytes, and 0 bytes to store
    Call AddGroupCodeToStream2(0, 0)
'maybe we have some bits leftover so lets store them
    For X = 0 To 3
        Do While Stream(X).BitPos > 0
            Call AddBitsToStream(Stream(X), 0, 1)
        Loop
    Next
    For X = 0 To 3
        If Stream(X).Position > 0 Then
            ReDim Preserve Stream(X).Data(Stream(X).Position - 1)
        Else
            ReDim Stream(X).Data(0)
        End If
    Next
    
    
'totaal benodigde ruimte berekenen en instellen
    TotFileLen = 0
    For X = 0 To 3
        TotFileLen = TotFileLen + UBound(Stream(X).Data) + 1
    Next
    ReDim ByteArray(TotFileLen - 1 + 9)
    
'kopieren naar de uiteindelijke array
    TotFileLen = 0
    For X = 0 To 2
        ByteArray(TotFileLen) = Int((UBound(Stream(X).Data) + 1) / &H10000) And &HFF
        TotFileLen = TotFileLen + 1
        ByteArray(TotFileLen) = Int((UBound(Stream(X).Data) + 1) / &H100) And &HFF
        TotFileLen = TotFileLen + 1
        ByteArray(TotFileLen) = (UBound(Stream(X).Data) + 1) And &HFF
        TotFileLen = TotFileLen + 1
    Next
    For X = 0 To 3
        For Y = 0 To UBound(Stream(X).Data)
            ByteArray(TotFileLen) = Stream(X).Data(Y)
            TotFileLen = TotFileLen + 1
        Next
    Next
End Sub

Private Sub AddGroupCodeToStream2(Number As Long, GroupNum As Integer)
    Dim NumVal As Long
'Store 3 bits to say what grouping method is used
    Call AddBitsToStream(Stream(0), CLng(GroupNum), 3)
'store the length of the groep
    NumVal = GetExtraBits(Number)
    Call AddBitsToStream(Stream(1), NumVal, 5)
    Call AddBitsToStream(Stream(1), Number, CLng(ExtraLengthBits(NumVal)))
End Sub

Private Function GetExtraBits(Number As Long) As Long
'store the length of the groep
    Dim Y As Long
    For Y = 0 To 31
        If StartValLength(Y) + 2 ^ ExtraLengthBits(Y) > Number Then
            Exit For
        End If
    Next
    GetExtraBits = Y
End Function

Private Sub AddLowValueToStream(Number As Long)
    Call AddBitsToStream(Stream(2), Number, 8)
End Sub

Private Sub AddLiteralCodeToStream(Number As Long, Numbits As Integer)
    Call AddBitsToStream(Stream(3), Number, Numbits)
End Sub

'this sub will add an amount of bits to a sertain stream
Private Sub AddBitsToStream(Toarray As BytePos, Number As Long, Numbits As Integer)
    Dim X As Long
    If Numbits = 8 And Toarray.BitPos = 0 Then
        If Toarray.Position > UBound(Toarray.Data) Then ReDim Preserve Toarray.Data(Toarray.Position + 500)
        Toarray.Data(Toarray.Position) = Number And &HFF
        Toarray.Position = Toarray.Position + 1
        Exit Sub
    End If
    For X = Numbits - 1 To 0 Step -1
        Toarray.Buffer = Toarray.Buffer * 2 + (-1 * ((Number And 2 ^ X) > 0))
        Toarray.BitPos = Toarray.BitPos + 1
        If Toarray.BitPos = 8 Then
            If Toarray.Position > UBound(Toarray.Data) Then ReDim Preserve Toarray.Data(Toarray.Position + 500)
            Toarray.Data(Toarray.Position) = Toarray.Buffer
            Toarray.BitPos = 0
            Toarray.Buffer = 0
            Toarray.Position = Toarray.Position + 1
        End If
    Next
End Sub

'This is Smart part of the grouping method
'it will look for the way to get the best compression
Private Function CheckForBetterWithin2(InArray() As Byte, Group() As Grouping, MaxGroup As Integer, StartPositie As Long)
    Dim LowInGroup As Integer               'lowest value found
    Dim HighInGroup As Integer              'highest value found
    Dim GroupSize As Integer                'size of the group 1-7
    Dim NumInGroup As Long                  'total numbers in group
    Dim RealBegin As Long

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产综合色视频| 欧美午夜理伦三级在线观看| 成人亚洲一区二区一| 欧美日韩在线电影| 久久精品亚洲麻豆av一区二区| 亚洲综合色婷婷| 国产精品一卡二| 日韩欧美综合一区| 亚洲成人1区2区| 97精品超碰一区二区三区| 2024国产精品视频| 日韩黄色免费网站| 欧美主播一区二区三区| 亚洲视频小说图片| 国产不卡在线视频| 欧美精品一区二区三区久久久 | 成人性生交大片免费| 精品国产精品网麻豆系列| 亚洲国产中文字幕在线视频综合| 成人精品在线视频观看| 国产欧美日韩麻豆91| 国产精品亚洲午夜一区二区三区 | 亚洲美腿欧美偷拍| 成人精品小蝌蚪| 中文字幕av资源一区| 国产成人啪免费观看软件| 2021国产精品久久精品| 狠狠色综合色综合网络| 精品久久国产老人久久综合| 麻豆国产一区二区| 精品久久久久久久一区二区蜜臀| 精品一区二区影视| 久久久久久久久免费| 国产福利电影一区二区三区| 国产午夜亚洲精品理论片色戒| 国产一区二区看久久| 国产亚洲欧洲997久久综合| 国产成人免费xxxxxxxx| 国产亚洲女人久久久久毛片| 国产成人精品三级| 亚洲欧洲性图库| 欧美在线观看18| 日韩中文字幕91| 2017欧美狠狠色| av在线一区二区| 亚洲最色的网站| 欧美剧在线免费观看网站 | 国产一区视频在线看| 久久久久久久国产精品影院| 国产高清不卡二三区| 成人欧美一区二区三区1314| 欧美在线视频全部完| 日韩vs国产vs欧美| 久久久精品影视| 91国在线观看| 老司机午夜精品| |精品福利一区二区三区| 欧美三日本三级三级在线播放| 日韩电影免费一区| 日本一区二区三级电影在线观看| 91在线观看美女| 美女在线观看视频一区二区| 欧美韩日一区二区三区| 欧美日韩国产不卡| 国产精品亚洲成人| 亚洲一区二区免费视频| 精品国内二区三区| 色94色欧美sute亚洲13| 久久99精品国产麻豆不卡| 亚洲日本免费电影| 欧美videossexotv100| 99久久久无码国产精品| 蜜桃传媒麻豆第一区在线观看| 国产精品网曝门| 欧美三级三级三级爽爽爽| 国产一区二区视频在线播放| 亚洲国产精品一区二区久久| 久久蜜桃一区二区| 91精品欧美一区二区三区综合在 | 日本国产一区二区| 国产一区二区三区日韩| 亚洲国产精品天堂| 亚洲欧美偷拍卡通变态| 久久久精品影视| 日韩一区二区高清| 精品视频999| 91久久一区二区| 国产精品一色哟哟哟| 蜜乳av一区二区三区| 伊人婷婷欧美激情| 国产欧美精品一区二区三区四区 | 在线视频一区二区三| 国产91高潮流白浆在线麻豆| 美脚の诱脚舐め脚责91| 三级精品在线观看| 亚洲资源中文字幕| 玉足女爽爽91| 国产精品高潮呻吟久久| 国产三级久久久| 国产日韩亚洲欧美综合| 日韩一区二区三区电影在线观看| 欧美日韩在线一区二区| 欧美亚洲禁片免费| 在线亚洲免费视频| 在线看不卡av| 欧美天堂亚洲电影院在线播放| 91蜜桃在线观看| 91免费观看在线| 色哟哟亚洲精品| 在线视频一区二区三| 欧美午夜在线观看| 欧美麻豆精品久久久久久| 欧美日韩一区三区四区| 欧美福利视频导航| 日韩天堂在线观看| 精品人在线二区三区| 久久亚洲精品小早川怜子| 久久综合久久鬼色| 国产欧美日韩不卡| 亚洲人成电影网站色mp4| 一区二区三区欧美日韩| 亚洲国产aⅴ天堂久久| 亚洲成人资源网| 天堂va蜜桃一区二区三区漫画版| 日韩国产精品久久久| 久久激情综合网| 国产成人高清在线| 91麻豆精东视频| 欧美高清你懂得| 久久日韩精品一区二区五区| 国产亚洲短视频| 亚洲欧洲成人自拍| 亚洲一级二级三级在线免费观看| 日韩成人免费看| 国产成人三级在线观看| 91福利小视频| 欧美一级日韩免费不卡| 国产日韩欧美在线一区| 中文字幕一区免费在线观看| 亚洲成人综合在线| 国产在线精品一区二区夜色| 91在线视频免费91| 欧美日韩成人一区| 久久精品一区蜜桃臀影院| 亚洲美腿欧美偷拍| 久久国产福利国产秒拍| av日韩在线网站| 欧美一级艳片视频免费观看| 中文字幕av资源一区| 日韩精品视频网站| 成人伦理片在线| 日韩亚洲欧美一区二区三区| 欧美韩日一区二区三区| 日韩精品福利网| 91丨九色porny丨蝌蚪| 日韩欧美一卡二卡| 亚洲精品视频在线看| 国内精品久久久久影院一蜜桃| 色综合久久综合中文综合网| 欧美videossexotv100| 亚洲主播在线观看| 成人一区二区三区| 欧美电影免费观看完整版 | 亚洲国产精品精华液ab| 性久久久久久久久久久久| 福利电影一区二区| 欧美变态tickling挠脚心| 亚洲精品成人悠悠色影视| 国产精品亚洲а∨天堂免在线| 欧美精品日韩综合在线| 亚洲免费观看高清完整版在线观看 | 亚洲欧美日韩国产手机在线| 久久精品久久综合| 精品视频一区二区不卡| 亚洲欧美一区二区三区久本道91| 狠狠色丁香久久婷婷综合_中| 欧美性生活大片视频| 亚洲欧洲日本在线| 国产成人精品免费一区二区| 欧美videossexotv100| 日韩经典一区二区| 欧美日韩1区2区| 亚洲综合无码一区二区| av亚洲精华国产精华| 欧美激情一区二区三区四区| 国产一区日韩二区欧美三区| 日韩精品一区二区三区在线播放| 亚洲专区一二三| 欧美无砖专区一中文字| 一区二区三区中文在线观看| 91在线高清观看| 亚洲人成小说网站色在线 | 最新欧美精品一区二区三区| 国产精品一二二区| 久久久三级国产网站| 久久国产精品免费| 精品国产一区二区三区久久久蜜月| 亚洲电影一区二区三区| 在线影院国内精品| 亚洲午夜精品久久久久久久久|