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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? comp_groupsmart.bas

?? 網(wǎng)上收集的多種加密解密以及壓縮算法vb源碼。
?? BAS
?? 第 1 頁 / 共 2 頁
字號(hào):
    BestCompression = 0
    If MaxGroup = 1 Then Exit Function          'better than the use of 1 bit ????
    Do While StartPos + NumInGroup <= RealBegin + Group(StartGroep).NumInGroup - 1
        CheckLen = RealBegin - StartPos + Group(StartGroep).NumInGroup - 1
'if ther are less then 3 bytes to check we exit
        If CheckLen < 3 Then Exit Function
        WheHaveCompression = False
        GroupSize = 1                   'Lets start with the minimal groupsize
        Group(GroupSize).LowValue = InArray(StartPos + NumInGroup)
        Group(GroupSize).HighValue = InArray(StartPos + NumInGroup)
'check if we don't check the group we started with
        Do While (GroupSize < StartGroep) And (NumInGroup < 65535)
            NumInGroup = NumInGroup + 1
            Group(GroupSize).NumInGroup = NumInGroup
'if we are at the end of the group we exit
            If StartPos + NumInGroup > RealBegin + Group(StartGroep).NumInGroup - 1 Then GoSub Calc_Compression: Exit Do
            Char = InArray(StartPos + NumInGroup)
            If Char < Group(GroupSize).LowValue Then
                If Group(GroupSize).HighValue - Char >= 2 ^ GroupSize Then
                    GoSub Calc_Compression              'we have have found the maximum numer in the group
                    If GroupSize < StartGroep - 1 Then
'why start over again for the next group
'if the number 15 will fit in 4 bits it shure will fit in 5
                        Group(GroupSize + 1).LowValue = Group(GroupSize).LowValue
                        Group(GroupSize + 1).HighValue = Group(GroupSize).HighValue
                    End If
                    GroupSize = GroupSize + 1
                Else
                    Group(GroupSize).LowValue = Char
                End If
            ElseIf Char > Group(GroupSize).HighValue Then
                If Char - Group(GroupSize).LowValue >= 2 ^ GroupSize Then
                    GoSub Calc_Compression
                    If GroupSize < StartGroep - 1 Then
                        Group(GroupSize + 1).LowValue = Group(GroupSize).LowValue
                        Group(GroupSize + 1).HighValue = Group(GroupSize).HighValue
                    End If
                    GroupSize = GroupSize + 1
                Else
                    Group(GroupSize).HighValue = Char
                End If
            End If
        Loop
        If WheHaveCompression = True Then
            If RealBegin = StartPos Then
'if the beginning of the group is the same we startted with we have found a best group and leave
                CheckForBetterWithin = BestGroep
                Exit Function
            Else
'if not, then we have to check if there is maybe a compression possible in the part between
'the start of the file and the start of the new found bestgroep (again we start with no compression)
                Group(8).NumInGroup = StartPos - RealBegin
                BestGroep = 8
                NewBestGroep = CheckForBetterWithin(InArray, Group, 8, RealBegin)
                Do While BestGroep <> NewBestGroep
                    BestGroep = NewBestGroep
                    NewBestGroep = CheckForBetterWithin(InArray, Group, BestGroep, RealBegin)
                Loop
                CheckForBetterWithin = BestGroep
                Exit Function
            End If
        Else
'if we didn't find compression then maybe there is a part further up in the file that achieves
'even better compression
            StartPos = StartPos + 1
            NumInGroup = 0
        End If
    Loop
    Exit Function
Calc_Compression:
'bits needed if we dont do compression or maybe did already
'3 for the compression method
'3 for the number with will tell the amount of next bits to read
'? numbers of bits needed to store the number of groupsize
'if whe already would do it with compression we need 8 bits for the lowvalue
'plus ofcourse the numbers of bits needed to store the group
    If CheckLen > 65535 Then CheckLen = 65535
    BitsNoComp = 3 + 3 + NumExtBits(GetExtraBitsNum(Group(GroupSize).NumInGroup)) + (8 * Abs(MaxGroup < 8)) + (Group(GroupSize).NumInGroup * 8) - (Group(GroupSize).NumInGroup * (8 - MaxGroup))
'bits needed to store compression
'3 for method,3 for bits needed,the groupsize,8 bits for lowest value and the group itself
    BitsComp = 3 + 3 + NumExtBits(GetExtraBitsNum(Group(GroupSize).NumInGroup)) + (8 * Abs(GroupSize < 8)) + (Group(GroupSize).NumInGroup * 8) - (Group(GroupSize).NumInGroup * (8 - GroupSize))
'if the new groep falls within the range of the old one whe also need to store the header the old group again
    If Group(GroupSize).NumInGroup <= Group(MaxGroup).NumInGroup Then BitsComp = BitsComp + 3 + 3 + NumExtBits(GetExtraBitsNum(CheckLen - StartPos - Group(GroupSize).NumInGroup)) + (8 * Abs(MaxGroup < 8))
'if the start position of the new group is different whe also need the store a new header for that group
    If StartPos <> RealBegin Then BitsComp = BitsComp + 3 + 3 + NumExtBits(GetExtraBitsNum(RealBegin - StartPos)) ' + (8 * Abs(MaxGroup < 8))
    NumInGroup = NumInGroup - 1
'if it is still better than the old method then whe have found a new group
    If BitsComp < BitsNoComp Then
        If BestCompression < BitsNoComp - BitsComp Then
            BestCompression = BitsNoComp - BitsComp
            WheHaveCompression = True
            BestGroep = GroupSize
        End If
    End If
    Return
End Function

'this peace of code is very strait forward
Public Sub DeCompress_SmartGrouping(ByteArray() As Byte)
    Dim AddFileLen As Long
    Dim OutStream() As Byte         'de output array
    Dim InpPos As Long
    Dim NewPos As Long
    Dim MaxPos As Long
    Dim PackedOrNot As Integer
    Dim NumBytes As Long
    Dim LowInGroup As Integer       'Laagste waarde in de groep
    Dim NumVal As Byte
    Dim X As Long
    AddFileLen = UBound(ByteArray) / 4
    ReDim OutStream(UBound(ByteArray) + AddFileLen)
    MaxPos = UBound(OutStream)
    InpPos = 0
    NewPos = 0
    Call Init_Grouping
    Do                                                              'loop until done
'read 3 bits to get grouping method (0 = not grouped)
        PackedOrNot = ReadBitsFromArray(ByteArray, InpPos, 3)
'read 3 bits to get the bits needed for the groupsize
        NumVal = ReadBitsFromArray(ByteArray, InpPos, 3)
'read the amount of data needed for the group
        NumBytes = ReadBitsFromArray(ByteArray, InpPos, CInt(NumExtBits(NumVal)))
'add an extra bit if needed (number 15 fits in 3 bits)
        If NumVal > 0 And NumVal < 7 Then
            NumBytes = NumBytes Or 2 ^ (NumVal + 2)
        End If
        If NumBytes = 0 Then Exit Do            'whe are done
        If PackedOrNot = 0 Then
'if not grouped, read the amount of nongrouped data (8 bits)
            For X = 1 To NumBytes       'de bytes zijn niet geGrouped
                If NewPos > MaxPos Then GoSub Increase_Outstream
                OutStream(NewPos) = ReadBitsFromArray(ByteArray, InpPos, 8)
                NewPos = NewPos + 1
            Next
        Else
'if grouped, read the lowest value in the group
            LowInGroup = ReadBitsFromArray(ByteArray, InpPos, 8)
'and get the amount of data for that group
            For X = 1 To NumBytes       'de bytes zijn  geGrouped
                If NewPos > MaxPos Then GoSub Increase_Outstream
                OutStream(NewPos) = ReadBitsFromArray(ByteArray, InpPos, PackedOrNot) + LowInGroup
                NewPos = NewPos + 1
            Next
        End If
    Loop
    NewPos = NewPos - 1
    ReDim ByteArray(NewPos)
'copy the temporary outputstream into the input stream to return it to the caller
    Call CopyMem(ByteArray(0), OutStream(0), NewPos + 1)
    Exit Sub
    
Increase_Outstream:
'this is used if the reserved amount of store space wasn't sufficient
    ReDim Preserve OutStream(NewPos + AddFileLen)
    MaxPos = UBound(OutStream)
    Return
End Sub

'this function will return a value out of the amaunt of bits you asked for
Private Function ReadBitsFromArray(FromArray() As Byte, FromPos As Long, Numbits As Integer) As Long
    Dim X As Integer
    Dim Temp As Long
    For X = 1 To Numbits
        Temp = Temp * 2 + (-1 * ((FromArray(FromPos) And 2 ^ (7 - ReadBitPos)) > 0))
        ReadBitPos = ReadBitPos + 1
        If ReadBitPos = 8 Then
            If FromPos + 1 > UBound(FromArray) Then
                Do While X < Numbits
                    Temp = Temp * 2
                    X = X + 1
                Loop
                FromPos = FromPos + 1
                Exit For
            End If
            FromPos = FromPos + 1
            ReadBitPos = 0
        End If
    Next
    ReadBitsFromArray = Temp
End Function


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91黄色在线观看| 国产麻豆午夜三级精品| 91久久精品一区二区| 亚洲三级电影网站| 在线观看日韩国产| 午夜精品影院在线观看| 3d成人h动漫网站入口| 三级在线观看一区二区 | 成人av网站在线| 中文字幕在线观看一区| 欧美自拍丝袜亚洲| 久久av资源站| 国产精品视频免费| 精品视频一区二区三区免费| 日韩精品亚洲专区| 中日韩av电影| 欧美日韩欧美一区二区| 狠狠色丁香久久婷婷综合_中| 国产精品久久久久永久免费观看| 色爱区综合激月婷婷| 久久精品国产亚洲高清剧情介绍 | 欧美日韩激情一区| 激情五月激情综合网| 国产精品色噜噜| 欧美人狂配大交3d怪物一区| 国产成人免费视频| 亚洲第一电影网| 国产亚洲精品bt天堂精选| 色欧美片视频在线观看| 国产在线视频一区二区三区| 亚洲日韩欧美一区二区在线| 日韩欧美国产综合在线一区二区三区 | 免费在线观看一区| 中文一区二区完整视频在线观看 | 91蜜桃传媒精品久久久一区二区| 欧美aaaaa成人免费观看视频| 亚洲欧洲一区二区三区| 91精品国产欧美一区二区成人| 成人小视频免费观看| 日本视频在线一区| 亚洲另类色综合网站| 久久久久久99精品| 欧美一区二区三区思思人| 成人av在线资源网站| 日本网站在线观看一区二区三区| 国产精品动漫网站| 久久女同互慰一区二区三区| 欧美日韩午夜影院| 一本在线高清不卡dvd| 国产成a人无v码亚洲福利| 日本不卡在线视频| 亚洲国产精品久久久男人的天堂| 国产精品美女久久久久久久久| 日韩一区二区免费在线观看| av成人免费在线| 国产精品白丝av| 久久国内精品视频| 天天亚洲美女在线视频| 亚洲小说欧美激情另类| 亚洲精品伦理在线| 国产一区二区主播在线| 日韩精品专区在线影院重磅| 男女男精品视频| 亚洲国产婷婷综合在线精品| 国产性色一区二区| 精品91自产拍在线观看一区| 精品免费日韩av| 日韩精品一区二区三区中文精品| 欧美日韩一级黄| 欧美三区在线观看| 欧美日免费三级在线| 欧美视频在线不卡| 欧美三片在线视频观看| 欧美日韩小视频| 欧美久久婷婷综合色| 欧美三区在线视频| 欧美一区午夜视频在线观看| 日韩三级伦理片妻子的秘密按摩| 欧美日韩二区三区| 在线电影欧美成精品| 欧美群妇大交群中文字幕| 欧美日韩高清在线播放| 777久久久精品| 精品国产免费久久| 欧美激情一区不卡| 亚洲欧洲精品一区二区精品久久久 | 国模娜娜一区二区三区| 国产乱国产乱300精品| 国产电影精品久久禁18| 99视频有精品| 在线影视一区二区三区| 7777精品伊人久久久大香线蕉完整版 | 成人免费三级在线| 99国产精品久久久| 在线观看亚洲成人| 欧美一区二区日韩一区二区| 精品播放一区二区| 亚洲视频在线一区二区| 亚洲成人久久影院| 国产在线精品一区二区不卡了| 成人国产精品免费观看动漫| 欧美三级韩国三级日本三斤| 日韩精品一区二区三区中文精品| 中文字幕第一区综合| 亚洲国产精品久久人人爱| 久久精工是国产品牌吗| 不卡高清视频专区| 91精品国产麻豆| 中文字幕av一区二区三区免费看| 亚洲国产综合91精品麻豆| 免费观看30秒视频久久| 不卡大黄网站免费看| 日韩视频免费观看高清完整版| 亚洲国产精品99久久久久久久久| 亚洲国产aⅴ天堂久久| 国产精品一区二区视频| 在线亚洲人成电影网站色www| 日韩欧美电影在线| 亚洲乱码国产乱码精品精的特点| 久久99久久久欧美国产| 色av成人天堂桃色av| 久久综合色天天久久综合图片| 一区二区三区资源| 国产精品自在欧美一区| 欧美日韩高清一区二区三区| 国产精品国产a级| 久久se这里有精品| 欧美日韩中文字幕一区| 国产精品久久免费看| 久久精品国产精品亚洲精品| 欧美伊人精品成人久久综合97| 国产香蕉久久精品综合网| 日韩中文字幕区一区有砖一区| aaa亚洲精品| 久久亚洲春色中文字幕久久久| 亚洲国产日日夜夜| 色婷婷久久久综合中文字幕| 国产日韩av一区| 国产真实乱偷精品视频免| 欧美精品1区2区| 亚洲一区二区在线观看视频 | 国产一区二区导航在线播放| 欧美色图片你懂的| 亚洲乱码精品一二三四区日韩在线| 国产精品99久久久久久似苏梦涵 | 久久电影网电视剧免费观看| 在线免费观看日本一区| 中文字幕亚洲电影| 国产成人免费在线观看不卡| 精品国产一二三区| 强制捆绑调教一区二区| 777久久久精品| 亚洲电影你懂得| 欧美亚洲丝袜传媒另类| 一区二区三区四区在线播放| 91在线视频免费91| 中文字幕一区二区三区在线播放 | 日韩你懂的在线播放| 丝袜a∨在线一区二区三区不卡| 色婷婷av一区二区三区之一色屋| 国产精品日日摸夜夜摸av| 国产成人精品一区二| 26uuu国产在线精品一区二区| 免费在线成人网| 日韩精品专区在线影院重磅| 久久99国产精品成人| 欧美不卡视频一区| 国产美女在线精品| 欧美激情在线看| 99国产精品国产精品久久| 亚洲女子a中天字幕| 色婷婷一区二区| 午夜不卡在线视频| 日韩一级免费观看| 国产一区二区三区国产| 国产精品欧美久久久久一区二区| 成a人片国产精品| 樱花草国产18久久久久| 欧美日韩国产一区| 日韩中文字幕区一区有砖一区 | 亚洲免费色视频| 欧美亚洲国产bt| 日韩精品一二三| 久久天堂av综合合色蜜桃网| 成人永久aaa| 亚洲综合色网站| 日韩精品一区二区三区视频在线观看 | 欧洲av在线精品| 午夜免费久久看| 欧美精品一区二区三区久久久| 国产精品白丝av| 亚洲欧美日韩电影| 91麻豆精品国产91久久久久久久久| 久久成人羞羞网站| 国产精品久久久久影院色老大| 欧美三级视频在线| 国产乱码精品1区2区3区| 亚洲女同ⅹxx女同tv| 欧美一区二区三区在线观看| 成人午夜激情片|