亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
91污在线观看| 91蜜桃婷婷狠狠久久综合9色| 成人免费在线观看入口| 久久久www免费人成精品| 51精品视频一区二区三区| 色又黄又爽网站www久久| 91免费视频大全| 91啪九色porn原创视频在线观看| 99精品国产一区二区三区不卡| 成人综合婷婷国产精品久久蜜臀| 欧美亚洲国产怡红院影院| 91在线国产福利| 播五月开心婷婷综合| 成人黄色小视频在线观看| 色综合久久中文综合久久牛| 一道本成人在线| 在线亚洲免费视频| 欧美高清你懂得| 26uuu亚洲| 国产精品区一区二区三区| 亚洲欧洲日韩在线| 五月天久久比比资源色| 久草精品在线观看| 国产剧情一区在线| 色综合亚洲欧洲| 91精品国产综合久久小美女| 欧美成人aa大片| 欧美韩日一区二区三区四区| 亚洲美女免费视频| 青青草原综合久久大伊人精品 | 欧美日韩一区视频| 欧美一区二区三区在线| 国产精品女上位| 亚洲bt欧美bt精品777| 国产美女一区二区三区| 91麻豆swag| 日韩欧美三级在线| 中文字幕佐山爱一区二区免费| 亚洲va国产va欧美va观看| 国产一区二区视频在线| 色综合中文字幕| 91精品国产综合久久婷婷香蕉| 欧美韩国日本综合| 日本sm残虐另类| av在线一区二区| 精品国产乱码久久久久久浪潮| 中文字幕中文字幕一区| 奇米精品一区二区三区在线观看| 国产福利91精品| 欧美日韩久久不卡| 日韩毛片精品高清免费| 激情综合色综合久久| 在线观看视频欧美| 国产女人18毛片水真多成人如厕| 亚洲成人av在线电影| 不卡的av电影| 精品电影一区二区| 日本亚洲最大的色成网站www| 色妹子一区二区| 亚洲国产成人一区二区三区| 琪琪久久久久日韩精品| 欧美日韩在线播放三区四区| 亚洲欧美在线观看| 粉嫩久久99精品久久久久久夜| 日韩无一区二区| 天天色天天操综合| 欧美在线三级电影| 亚洲天堂成人在线观看| 成人黄色在线看| 国产精品美女久久久久久2018| 性做久久久久久免费观看| 色哟哟国产精品| 1000精品久久久久久久久| 成+人+亚洲+综合天堂| 国产亚洲短视频| 国产成人亚洲综合a∨婷婷图片| 日韩精品综合一本久道在线视频| 日韩专区在线视频| 欧美精品丝袜中出| 日本中文字幕一区| 日韩欧美国产一区在线观看| 日日夜夜免费精品| 日韩一区二区三区电影| 久久99精品国产.久久久久久| 欧美一区二区三区免费| 久久99久久久久久久久久久| 日韩午夜精品视频| 国产精品一卡二| 国产精品美女www爽爽爽| 91视频精品在这里| 亚洲成人动漫av| 欧美哺乳videos| 国产成人精品影视| 樱桃国产成人精品视频| 欧美三级在线播放| 韩国av一区二区三区在线观看| 精品国产乱码久久久久久免费| 国产99一区视频免费| **网站欧美大片在线观看| 日本高清不卡视频| 欧美aaa在线| 中文av字幕一区| 欧美性猛交xxxxxxxx| 久久99深爱久久99精品| 中文字幕第一区第二区| 欧美性淫爽ww久久久久无| 免费三级欧美电影| 国产精品二三区| 欧美美女一区二区三区| 国产馆精品极品| 亚洲综合小说图片| 久久伊99综合婷婷久久伊| 97se亚洲国产综合自在线观| 免费高清在线一区| 亚洲精品一二三四区| 精品国产欧美一区二区| 在线一区二区三区四区| 狠狠色丁香婷婷综合久久片| 亚洲最大成人综合| 久久女同互慰一区二区三区| 欧美视频一区在线| 成人午夜碰碰视频| 久久精品国产精品亚洲精品| 亚洲视频中文字幕| 2020国产精品自拍| 欧美精品v国产精品v日韩精品| 懂色av一区二区夜夜嗨| 日本不卡视频一二三区| 一区二区三区日韩欧美| 国产欧美日韩一区二区三区在线观看| 欧美日韩一级片网站| 成人avav影音| 国产精品99久久久久久宅男| 日韩avvvv在线播放| 亚洲永久免费av| 中文字幕一区二区三区不卡在线| 日韩精品在线看片z| 欧美精品第1页| 欧美三级电影精品| 在线视频观看一区| 91天堂素人约啪| 成人免费视频一区二区| 国产精品一区二区在线播放| 美女视频黄a大片欧美| 亚洲大型综合色站| 亚洲国产裸拍裸体视频在线观看乱了| 国产欧美久久久精品影院| 久久先锋影音av| 精品国产第一区二区三区观看体验| 欧美男人的天堂一二区| 在线观看亚洲成人| 欧美在线一区二区三区| 色av成人天堂桃色av| 在线视频国内自拍亚洲视频| 欧美影院精品一区| 欧美三级视频在线| 欧美精品成人一区二区三区四区| 欧美日韩一二区| 欧美日韩久久久一区| 欧美一二三在线| 欧美一区二区免费观在线| 91麻豆精品国产91久久久资源速度| 欧美理论在线播放| 制服.丝袜.亚洲.中文.综合| 欧美大白屁股肥臀xxxxxx| 欧美va日韩va| 欧美—级在线免费片| 亚洲乱码国产乱码精品精的特点 | k8久久久一区二区三区| 成人精品视频一区二区三区| 成人av网站大全| 欧美亚一区二区| 日韩一级片在线观看| 久久久久久久久久久久久久久99| 欧美国产精品v| 亚洲一区二区三区四区中文字幕| 五月综合激情日本mⅴ| 久久99久久久久久久久久久| 成人蜜臀av电影| 欧美精选一区二区| 久久午夜老司机| 一区二区三区中文在线| 精品一区二区久久久| www.亚洲免费av| 91麻豆精品国产自产在线| 国产精品女同一区二区三区| 亚洲丰满少妇videoshd| 国精产品一区一区三区mba视频| 国产69精品久久99不卡| 欧美军同video69gay| 国产调教视频一区| 亚洲bt欧美bt精品| 粉嫩一区二区三区性色av| 欧美久久久久久久久| 国产精品欧美久久久久一区二区 | 欧美成人高清电影在线| 成人免费在线视频观看| 韩国在线一区二区| 欧美中文字幕久久 | 99在线精品观看|