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

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

?? comp_groupsmart.bas

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


Option Explicit

'This is a 1 run method

'This method is the smartgrouping method
'it will search for follower bytes within a curtain range wich
'will fit into a curtain bitlenght
'It will search as long as needed to find the best compression
'if it finds followers of 12*0 and 4*1 = 16 bytes it will be compressed
'because 0 - 0 and 1 - 0 will both fit into 1 bit, it will fit
'in 16*1 bit wich will lead to to the following
'in 17 headerbits and 16 codebits = 33 bits = 4 bytes and 1 bit
'if it finds followers of 12*0 and 4*173 = 16 bytes it will be compressed
'because 0 - 0 will fit in 1 bit and 173 - 173 will fit into 1 bit it will fit
'in 12*1 bit and 4*1 bit wich will lead to to the following
'in 17 headerbits and 12 codebits = 29 bits = 3 bytes and 5 bits
'in 17 headerbits and 4 codebits = 21 bits = 2 bytes and 3 bits
'wich get a total of 6 bytes

Private OutPos As Long              'invoeg positie voor de output array
Private OutBitCount As Integer
Private OutByteBuf As Byte
Private ReadBitPos As Integer
Private NumExtBits(7) As Byte

Private Type Grouping
    LowValue As Long
    HighValue As Long
    NumInGroup As Long
End Type
   
Private Sub Init_Grouping()
    OutPos = 0              'Next position in the output stream
    OutBitCount = 0         'Number of bits stored in the output buffer
    OutByteBuf = 0          'byte wich will be stores in outputstream if it is filled with 8 bits
    ReadBitPos = 0          'next position wich will be read
'This array is used to determen the amount of bits used to store a number
    NumExtBits(0) = 3       '<8
    NumExtBits(1) = 3       '<16
    NumExtBits(2) = 4       '<32
    NumExtBits(3) = 5       '<64
    NumExtBits(4) = 6       '<128
    NumExtBits(5) = 7       '<256
    NumExtBits(6) = 8       '<512
    NumExtBits(7) = 16      'the rest
End Sub

Public Sub Compress_SmartGrouping(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 TotFileLen As Long          'total file len
    Dim Group(1 To 8) As Grouping
    TotFileLen = UBound(ByteArray)
    ReDim OutStream(TotFileLen + (TotFileLen / 7))  'Worst case scenario
    BeginGroup = 0
'whe start by setting the beginvalues
    Call Init_Grouping
'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 not 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 = CheckForBetterWithin(ByteArray, Group, BestGroup, BeginGroup)
        Do While BestGroup <> NewBest
'yes there is, lets check again to be shure
            BestGroup = NewBest
            NewBest = CheckForBetterWithin(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 AddGroupCodeToStream(OutStream, 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 AddBitsToStream(OutStream, CLng(Group(BestGroup).LowValue), 8)
        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 AddBitsToStream(OutStream, 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 AddGroupCodeToStream(OutStream, 0, 0)
'maybe we have some bits leftover so lets store them
    If OutBitCount < 8 Then
        Do While OutBitCount < 8
            OutByteBuf = OutByteBuf * 2
            OutBitCount = OutBitCount + 1
        Loop
        OutStream(OutPos) = OutByteBuf: OutPos = OutPos + 1
    End If
    OutPos = OutPos - 1
    ReDim ByteArray(OutPos)
'lets copy the outputstream into the inputstream so that we can return the compressed file
'to the caller
    Call CopyMem(ByteArray(0), OutStream(0), OutPos + 1)
End Sub

'This part is used to select the extra bits used to store a value
Private Function GetExtraBitsNum(Number As Long)
    Select Case Number
    Case Is < 8
        GetExtraBitsNum = 0
    Case Is < 16
        GetExtraBitsNum = 1
    Case Is < 32
        GetExtraBitsNum = 2
    Case Is < 64
        GetExtraBitsNum = 3
    Case Is < 128
        GetExtraBitsNum = 4
    Case Is < 256
        GetExtraBitsNum = 5
    Case Is < 512
        GetExtraBitsNum = 6
    Case Else
        GetExtraBitsNum = 7
    End Select
End Function

Private Sub AddGroupCodeToStream(ToStream() As Byte, Number As Long, GroupNum As Integer)
    Dim NumVal As Byte
    Dim X As Long
'Store 3 bits to say what grouping method is used
    Call AddBitsToStream(ToStream, CLng(GroupNum), 3)
    NumVal = GetExtraBitsNum(Number)
'store 3 bits to with will tell the amount of bits to be read to get the groupsize
    Call AddBitsToStream(ToStream, CLng(NumVal), 3)
'store 3 to 16 bits to put in the groepsize
    Call AddBitsToStream(ToStream, Number, CInt(NumExtBits(NumVal)))
End Sub

'this sub will add an amount of bits into the outputstream
Private Sub AddBitsToStream(ToStream() As Byte, Number As Long, Numbits As Integer)
    Dim X As Long
    For X = Numbits - 1 To 0 Step -1
        OutByteBuf = OutByteBuf * 2 + (-1 * ((Number And 2 ^ X) > 0))
        OutBitCount = OutBitCount + 1
        If OutBitCount = 8 Then: ToStream(OutPos) = OutByteBuf: OutBitCount = 0: OutByteBuf = 0: OutPos = OutPos + 1
    Next
End Sub

'This is Smart part of the grouping method
'it will look for the way to get the best compression
Private Function CheckForBetterWithin(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
    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
    StartPos = StartPositie
    RealBegin = StartPos
    StartGroep = MaxGroup
    CheckForBetterWithin = MaxGroup

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情艳妇裸体舞| 91精品福利视频| 精品国内片67194| 国产在线乱码一区二区三区| 精品久久久久一区| 国产一区二区三区黄视频 | 国产精品一区免费视频| 久久亚洲欧美国产精品乐播| 国产黄色精品网站| 国产精品美女久久久久久久网站| 不卡一区二区三区四区| 亚洲精品一二三区| 欧美区在线观看| 久久超碰97人人做人人爱| 日韩免费电影一区| 亚洲成av人片www| 欧美日韩精品一区二区| 亚洲成a人片在线观看中文| 欧美图区在线视频| 亚洲高清免费观看| 69精品人人人人| 偷拍日韩校园综合在线| 9191国产精品| 国产高清一区日本| 日韩码欧中文字| 欧美三区在线观看| 波多野结衣精品在线| 亚洲精品乱码久久久久久黑人| 国产麻豆成人精品| 国产精品国产三级国产普通话99 | 国产精品国产三级国产普通话蜜臀 | 亚洲黄色免费网站| 欧美日韩一本到| 免费观看30秒视频久久| 久久久.com| 日本精品一区二区三区高清| 亚洲国产精品麻豆| 91精选在线观看| 精品无人区卡一卡二卡三乱码免费卡 | 99麻豆久久久国产精品免费| 一区二区三区四区在线| 欧美丰满美乳xxx高潮www| 国内外成人在线视频| 中文字幕制服丝袜成人av | 日韩一区欧美一区| 欧美久久一二区| 国产福利一区二区三区在线视频| 国产精品私人自拍| 色视频欧美一区二区三区| 亚洲国产精品视频| 2021中文字幕一区亚洲| 在线视频欧美区| 九九精品一区二区| 亚洲精选视频在线| 久久久www免费人成精品| 91看片淫黄大片一级在线观看| 日韩精品一二三区| 中文字幕成人av| 欧美精品高清视频| 成人aa视频在线观看| 性做久久久久久| 国产精品久久久久天堂| 在线不卡一区二区| 成人av午夜影院| 青青草国产精品97视觉盛宴 | 成人av在线资源| 日本麻豆一区二区三区视频| 亚洲精品网站在线观看| 久久久久久久久久久99999| 欧美伦理影视网| 91精品91久久久中77777| 国产麻豆精品theporn| 日本成人中文字幕| 亚洲一区二区三区四区五区中文| 国产色产综合色产在线视频| 91精品国产综合久久精品图片| 国产午夜亚洲精品理论片色戒| 555夜色666亚洲国产免| 色噜噜久久综合| 不卡一区中文字幕| 国产成人一级电影| 国产一区二区三区久久久 | 国产色综合久久| 精品欧美一区二区在线观看| 欧美日韩和欧美的一区二区| 日本黄色一区二区| 91免费版在线| 91香蕉国产在线观看软件| 国产成人aaa| 大陆成人av片| 国产精品系列在线播放| 韩日av一区二区| 国产乱码精品一区二区三| 久久99精品国产.久久久久 | 欧美成人video| 91精品国产色综合久久| 777久久久精品| 91精品一区二区三区久久久久久| 欧美精品aⅴ在线视频| 欧美精品自拍偷拍动漫精品| 一本色道久久综合亚洲91| 99久久综合国产精品| 东方欧美亚洲色图在线| 美脚の诱脚舐め脚责91| 美女视频一区在线观看| 午夜精品免费在线观看| 五月天欧美精品| 日韩1区2区3区| 在线欧美日韩国产| 国产麻豆一精品一av一免费| 国产很黄免费观看久久| 成人永久看片免费视频天堂| 国产精品影音先锋| proumb性欧美在线观看| 日本韩国一区二区| 5858s免费视频成人| 欧美va亚洲va香蕉在线| 国产午夜亚洲精品理论片色戒 | 成人国产亚洲欧美成人综合网| 91小视频免费看| 欧美性受极品xxxx喷水| 在线观看中文字幕不卡| 7777精品伊人久久久大香线蕉完整版 | 国产婷婷色一区二区三区四区| 精品国产伦一区二区三区免费| 中文字幕国产一区| 亚洲欧美日韩国产成人精品影院| 亚洲色图在线视频| 亚洲成人动漫在线免费观看| 另类小说图片综合网| 精品一区中文字幕| 91一区一区三区| 欧美mv和日韩mv的网站| 国产色综合久久| 一区二区三区中文免费| 麻豆精品新av中文字幕| 成人爱爱电影网址| 99久久免费视频.com| 91网站在线播放| 欧美一区二区三级| 日韩一区欧美一区| 日本最新不卡在线| 99麻豆久久久国产精品免费| 欧美成人a在线| 亚洲自拍另类综合| 久久不见久久见中文字幕免费| 97精品视频在线观看自产线路二| 日韩欧美在线一区二区三区| 国产精品成人一区二区艾草| 久久草av在线| 一本大道久久a久久精二百| 欧美变态凌虐bdsm| 中文字幕亚洲视频| 国产一区二区视频在线播放| 国产精品69毛片高清亚洲| 欧美精品v国产精品v日韩精品 | 欧美午夜不卡视频| 国产欧美一区视频| 久久福利视频一区二区| 欧美性感一类影片在线播放| 亚洲国产精品高清| 午夜视频一区二区| 99国产精品视频免费观看| 欧美午夜影院一区| 日韩欧美一级精品久久| 久久久www免费人成精品| 青椒成人免费视频| 91天堂素人约啪| 在线成人av影院| 亚洲成在人线在线播放| 99re8在线精品视频免费播放| 久久精品一二三| 奇米一区二区三区| 欧美少妇性性性| 亚洲三级理论片| 91蜜桃网址入口| 亚洲日本在线视频观看| www.一区二区| 欧美日韩国产不卡| 亚洲综合精品久久| 在线区一区二视频| 亚洲理论在线观看| 国产一区二区三区免费观看 | 在线综合+亚洲+欧美中文字幕| 亚洲精品成人在线| 色婷婷激情一区二区三区| 亚洲欧美日韩在线不卡| 91片黄在线观看| 久久久高清一区二区三区| 国产在线观看免费一区| 国产亚洲综合av| 国产一区二区三区精品视频| 精品区一区二区| 人人超碰91尤物精品国产| 日韩写真欧美这视频| 久久精品国产**网站演员| 精品国产乱码久久久久久图片 | 国产欧美日韩精品一区| 国产白丝网站精品污在线入口| 国产欧美一区二区三区沐欲|