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

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

?? comp_groupsmart2.bas

?? 網(wǎng)上收集的多種加密解密以及壓縮算法vb源碼。
?? BAS
?? 第 1 頁 / 共 2 頁
字號:
    Dim BestGroep As Integer                'the best group found
    Dim NewBestGroep As Integer             'check for bestgroup
    Dim StartGroep As Integer               'startgroup to hold the group wich will be checked for better comp.
    Dim BestCompression As Long             'maximum compression (for now)
    Dim WheHaveCompression As Boolean       'whe have found a better method
    Dim Char As Integer                     'character found in input stream
    Dim BitsNoComp As Long                  'bits used if no comp.
    Dim BitsComp As Long                    'bits used if comp.
    Dim CheckLen As Long                    'maximum bytes to check
    Dim StartPos As Long                    'startposition where the check will start
    Dim GroupBits As Integer
    Dim TotInGroup As Long
    StartPos = StartPositie
    RealBegin = StartPos
    StartGroep = MaxGroup
    CheckForBetterWithin2 = MaxGroup
    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
                CheckForBetterWithin2 = 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 = CheckForBetterWithin2(InArray, Group, 8, RealBegin)
                Do While BestGroep <> NewBestGroep
                    BestGroep = NewBestGroep
                    NewBestGroep = CheckForBetterWithin2(InArray, Group, BestGroep, RealBegin)
                Loop
                CheckForBetterWithin2 = BestGroep
                Exit Function
            End If
        Else
'if we didn't find compression then maybe ther 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
    TotInGroup = Group(GroupSize).NumInGroup
    GroupBits = ExtraLengthBits(GetExtraBits(TotInGroup))
    BitsNoComp = 3 + 5 + GroupBits + (8 * Abs(MaxGroup < 8)) + (TotInGroup * 8) - (TotInGroup * (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 + 5 + GroupBits + (8 * Abs(GroupSize < 8)) + (TotInGroup * 8) - (TotInGroup * (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 TotInGroup <= Group(MaxGroup).NumInGroup Then BitsComp = BitsComp + 3 + 5 + ExtraLengthBits(GetExtraBits(CheckLen - StartPos - TotInGroup)) + (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 + 5 + ExtraLengthBits(GetExtraBits(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_SmartGrouping2(ByteArray() As Byte)
    Dim AddFileLen As Long
    Dim OutStream() As Byte         'de output array
    Dim InCont As Long
    Dim InLong As Long
    Dim inLow As Long
    Dim InLitt As Long
    Dim InContBit As Integer
    Dim InLongBit As Integer
    Dim inLowBit As Integer
    Dim InLittBit As Integer
    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)
    InCont = 9
    InLong = CLng(ByteArray(0)) * 256 + ByteArray(1)
    InLong = CLng(InLong) * 256 + ByteArray(2)
    InLong = InCont + InLong
    inLow = CLng(ByteArray(3)) * 256 + ByteArray(4)
    inLow = CLng(inLow) * 256 + ByteArray(5)
    inLow = InLong + inLow
    InLitt = CLng(ByteArray(6)) * 256 + ByteArray(7)
    InLitt = CLng(InLitt) * 256 + ByteArray(8)
    InLitt = inLow + InLitt
    InContBit = 0
    InLittBit = 0
    InLongBit = 0
    inLowBit = 0
    NewPos = 0
    Call Init_Grouping2
    Do                                                              'loop until done
'read 3 bits to get grouping method (0 = not grouped)
        PackedOrNot = ReadBitsFromArray(ByteArray, InCont, InContBit, 3)
'read 5 bits to get the groupsize
        NumVal = ReadBitsFromArray(ByteArray, InLong, InLongBit, 5)
'read the amount of data needed for the group
        NumBytes = StartValLength(NumVal) + ReadBitsFromArray(ByteArray, InLong, InLongBit, CInt(ExtraLengthBits(NumVal)))
        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, InLitt, InLittBit, 8)
                NewPos = NewPos + 1
            Next
        Else
'if grouped, read the lowest value in the group
            LowInGroup = ReadBitsFromArray(ByteArray, inLow, inLowBit, 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, InLitt, InLittBit, 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, FromBit As Integer, 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 - FromBit)) > 0))
        FromBit = FromBit + 1
        If FromBit = 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
            FromBit = 0
        End If
    Next
    ReadBitsFromArray = Temp
End Function

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国在线观看| 日韩欧美亚洲国产精品字幕久久久 | 6080午夜不卡| av综合在线播放| 国产一区二区在线视频| 午夜精品视频在线观看| 中文字幕av在线一区二区三区| 欧美日韩精品一区二区三区| av成人老司机| 国产一区久久久| 青椒成人免费视频| 亚洲国产精品久久不卡毛片| 国产精品久久久久久一区二区三区 | 青青草国产精品亚洲专区无| 亚洲免费观看在线观看| 久久久精品日韩欧美| 日韩欧美国产一区在线观看| 欧美性受xxxx黑人xyx性爽| av中文字幕一区| 成人午夜视频福利| 极品美女销魂一区二区三区 | 一区二区三区在线播放| 亚洲国产精品黑人久久久| 久久亚洲私人国产精品va媚药| 9191国产精品| 91.xcao| 欧美日韩mp4| 欧美日韩一级二级三级| 欧美色图第一页| 欧美三级日韩三级| 欧美日韩国产小视频在线观看| 色综合中文字幕| 91啪亚洲精品| 99精品1区2区| 91美女在线视频| 97se亚洲国产综合自在线| 成人动漫视频在线| 99久久精品免费| 一本大道久久精品懂色aⅴ| 91视频在线观看| 91蜜桃传媒精品久久久一区二区| 91天堂素人约啪| 在线亚洲高清视频| 欧美日韩国产综合草草| 日韩一级片网址| 精品久久久久久亚洲综合网| 日韩欧美电影一区| 国产视频一区二区三区在线观看 | 性欧美疯狂xxxxbbbb| 亚洲与欧洲av电影| 天堂av在线一区| 秋霞午夜av一区二区三区| 精品午夜一区二区三区在线观看| 精品一区二区三区蜜桃| 国产老女人精品毛片久久| 成人免费福利片| 欧美中文字幕一区二区三区亚洲| 欧美麻豆精品久久久久久| 日韩美女一区二区三区四区| 国产调教视频一区| 亚洲精品老司机| 免费一级欧美片在线观看| 国产精品一区二区91| 99精品欧美一区| 欧美日韩黄色一区二区| 久久综合色婷婷| 成人欧美一区二区三区白人| 婷婷一区二区三区| 国产成人亚洲综合a∨婷婷图片| 99精品偷自拍| 日韩一区二区免费高清| 国产精品看片你懂得| 天天综合网天天综合色| 国产成人亚洲综合a∨婷婷图片| 在线观看一区日韩| 精品国产一区二区三区久久久蜜月| 国产精品蜜臀在线观看| 亚洲成人一二三| 丰满白嫩尤物一区二区| 欧美吻胸吃奶大尺度电影| 精品成人a区在线观看| 亚洲人成人一区二区在线观看| 日韩精彩视频在线观看| av一区二区三区四区| 日韩欧美一区二区三区在线| 国产精品狼人久久影院观看方式| 日本欧美在线观看| 欧美日韩在线综合| 国产精品美女久久久久久久| 日韩中文字幕1| 91啪亚洲精品| 国产丝袜在线精品| 强制捆绑调教一区二区| 91蝌蚪porny| 久久久久久久久97黄色工厂| 亚洲成a天堂v人片| 97久久超碰国产精品| 欧美mv和日韩mv国产网站| 亚洲图片一区二区| 成人午夜精品在线| 欧美不卡123| 午夜成人免费电影| 一本一道波多野结衣一区二区| 久久你懂得1024| 日韩电影一二三区| 欧美天天综合网| 最新热久久免费视频| 国产一区二区毛片| 欧美大片免费久久精品三p| 亚洲一区在线观看免费 | 久久久久久亚洲综合影院红桃| 亚洲一区二区在线播放相泽 | 欧美色图12p| 亚洲少妇中出一区| 成人va在线观看| 国产亚洲欧洲一区高清在线观看| 肉丝袜脚交视频一区二区| 欧洲精品在线观看| 亚洲人妖av一区二区| 丁香婷婷综合网| 欧美激情综合在线| 国产福利一区二区三区视频在线| 日韩欧美国产一区二区在线播放| 日韩制服丝袜av| 欧美日韩精品免费观看视频 | 久久99精品久久久久久动态图| 欧美日韩精品欧美日韩精品一综合| 亚洲男同1069视频| 色哟哟国产精品免费观看| 亚洲欧美一区二区不卡| 成人18视频在线播放| 日本一区二区三区在线观看| 国产91对白在线观看九色| 国产农村妇女精品| 国产91精品在线观看| 国产精品色呦呦| 99久久99精品久久久久久| 亚洲色图视频网站| 在线观看视频欧美| 五月婷婷综合网| 欧美性色黄大片| 免费在线视频一区| 久久久噜噜噜久久中文字幕色伊伊| 国产一区二区美女诱惑| 国产精品丝袜一区| 91蜜桃婷婷狠狠久久综合9色| 亚洲色图清纯唯美| 欧美日韩精品一二三区| 日韩高清不卡一区二区| 欧美成人免费网站| 国产福利一区二区三区视频| 中文字幕一区三区| 欧日韩精品视频| 毛片不卡一区二区| 国产欧美一区二区三区鸳鸯浴 | 日本一区二区电影| 色综合天天性综合| 天堂精品中文字幕在线| 日韩欧美一区电影| 国产成人免费视频网站高清观看视频| 国产精品免费看片| 欧美日韩中字一区| 国产毛片精品国产一区二区三区| 国产精品日日摸夜夜摸av| 在线区一区二视频| 久久99精品国产麻豆不卡| 国产精品的网站| 91精品国产综合久久国产大片| 激情综合网最新| 亚洲女与黑人做爰| 欧美成人综合网站| 91麻豆国产福利在线观看| 天天色综合天天| 国产精品―色哟哟| 欧美浪妇xxxx高跟鞋交| 国产91丝袜在线18| 日精品一区二区三区| 国产欧美日韩中文久久| 欧美日韩精品一区二区三区蜜桃| 国产精品888| 亚洲福利国产精品| 国产精品视频免费| 欧美高清精品3d| 成人黄色国产精品网站大全在线免费观看 | 26uuu精品一区二区在线观看| 色哟哟一区二区在线观看| 激情五月播播久久久精品| 亚洲精品视频观看| 久久综合狠狠综合| 欧美亚洲综合久久| 成人午夜电影网站| 日韩成人av影视| 一区二区三区中文在线观看| 久久精品亚洲麻豆av一区二区| 欧美视频日韩视频在线观看| 成人av小说网| 国产精品综合二区| 日本va欧美va精品发布| 亚洲一级二级三级| 国产精品久久久久久久浪潮网站|