亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品欧美久久久久无广告| 亚洲乱码国产乱码精品精小说| 国产欧美日本一区二区三区| 一区二区三区中文字幕| 久久69国产一区二区蜜臀| 在线亚洲人成电影网站色www| 一区二区三区欧美日韩| 久久成人免费网| 欧美少妇xxx| 1000部国产精品成人观看| 久久99精品久久久久婷婷| 欧美日韩国产一二三| 国产精品对白交换视频| 国产在线精品一区二区不卡了 | 精品一区二区免费在线观看| 99re亚洲国产精品| 国产午夜亚洲精品理论片色戒| 香蕉加勒比综合久久| kk眼镜猥琐国模调教系列一区二区| 日韩亚洲欧美综合| 亚洲va韩国va欧美va| 一本一道久久a久久精品| 国产精品久久久久久久久免费丝袜 | 亚洲一区二区三区国产| 波多野结衣亚洲| 国产精品女同互慰在线看| 国产精品正在播放| 久久久亚洲高清| 国产麻豆精品theporn| 日韩三级视频在线观看| 日韩二区三区在线观看| 欧美精品xxxxbbbb| 免费看欧美女人艹b| 56国语精品自产拍在线观看| 午夜视频一区在线观看| 欧美精品丝袜中出| 婷婷国产v国产偷v亚洲高清| 在线不卡中文字幕| 日韩精品色哟哟| 欧美电影免费提供在线观看| 免费xxxx性欧美18vr| 欧美白人最猛性xxxxx69交| 青青草97国产精品免费观看无弹窗版| 中文字幕一区二区三区蜜月| 国产成人亚洲精品狼色在线| 国产日韩亚洲欧美综合| 99久久精品国产网站| 亚洲另类春色校园小说| 欧美日韩午夜在线| 久久成人免费网| 国产欧美视频在线观看| www.av精品| 亚洲一区二区三区四区的| 欧美高清性hdvideosex| 精品一区二区免费| 亚洲欧美在线视频观看| 欧美午夜片在线看| 麻豆一区二区三区| 国产精品丝袜在线| 欧美性xxxxx极品少妇| 精品无码三级在线观看视频| 国产精品国产三级国产普通话99 | 久久国产三级精品| 国产精品女主播av| 欧美久久一二区| 国产最新精品精品你懂的| 亚洲三级在线看| 日韩欧美成人一区二区| 91在线观看成人| 日本成人在线不卡视频| 国产精品久久久久久亚洲伦| 欧美日韩激情在线| 成人精品一区二区三区中文字幕 | 91精品久久久久久久91蜜桃| 欧美一级国产精品| 色综合天天性综合| 极品瑜伽女神91| 亚洲综合偷拍欧美一区色| 久久综合网色—综合色88| 日本国产一区二区| 国产精品 欧美精品| 亚洲一卡二卡三卡四卡五卡| 久久久.com| 欧美美女bb生活片| 91麻豆免费看片| 福利视频网站一区二区三区| 日韩精品久久久久久| 日韩一区有码在线| 久久女同性恋中文字幕| 在线观看91精品国产麻豆| 色综合网站在线| 丰满白嫩尤物一区二区| 久久丁香综合五月国产三级网站| 亚洲最新在线观看| 国产精品电影一区二区| 久久久久国产精品厨房| 欧美一二三四区在线| 欧美三级中文字幕在线观看| av影院午夜一区| 成人激情开心网| 国产福利一区在线| 国产一区视频在线看| 欧美aaaaa成人免费观看视频| 一区av在线播放| 一区二区在线观看免费| 日韩一区在线播放| 亚洲婷婷综合久久一本伊一区| 亚洲国产精品ⅴa在线观看| 久久女同精品一区二区| 精品国产91亚洲一区二区三区婷婷| 欧美日韩视频在线观看一区二区三区 | 91蝌蚪porny| 波多野结衣中文字幕一区| 国产精品性做久久久久久| 国产在线一区二区综合免费视频| 久久国产日韩欧美精品| 久久国产尿小便嘘嘘尿| 国产一区二三区| 国产成人日日夜夜| www.欧美.com| 91久久精品一区二区二区| 欧美在线一区二区| 欧美影院午夜播放| 3atv在线一区二区三区| 日韩视频在线永久播放| 精品国产乱码久久久久久浪潮 | 亚洲线精品一区二区三区 | 欧美日韩一级片在线观看| 91黄色激情网站| 欧美精选午夜久久久乱码6080| 日韩一区二区三区在线| 久久久久国产精品人| 最近中文字幕一区二区三区| 亚洲婷婷在线视频| 日韩电影免费在线| 国产成人综合亚洲91猫咪| 91年精品国产| 欧美一区欧美二区| 国产日韩欧美高清| 亚洲精品成a人| 免费成人你懂的| 成人性生交大片免费看视频在线 | 成人激情动漫在线观看| 91麻豆精品秘密| 日韩一级片在线播放| 国产日韩欧美麻豆| 亚洲综合免费观看高清在线观看| 麻豆国产91在线播放| www.欧美日韩| 日韩三级高清在线| 国产精品久久看| 蜜桃久久精品一区二区| eeuss鲁片一区二区三区在线观看| 欧美三级视频在线播放| 久久理论电影网| 亚洲成在人线在线播放| 国内精品久久久久影院色| 色婷婷激情一区二区三区| 91视频精品在这里| 日韩欧美亚洲另类制服综合在线| 国产精品美女久久久久久久| 亚洲国产综合色| 不卡电影一区二区三区| 欧美一级片在线观看| 日韩美女视频一区二区| 国产在线精品一区二区| 欧美日韩免费视频| 中文av一区特黄| 久久精工是国产品牌吗| 欧美视频精品在线观看| 中文字幕二三区不卡| 麻豆成人91精品二区三区| 欧美亚日韩国产aⅴ精品中极品| 久久亚洲欧美国产精品乐播| 亚洲成国产人片在线观看| 99视频精品免费视频| 国产亚洲综合av| 麻豆91在线看| 日韩亚洲欧美高清| 亚洲一区二区三区爽爽爽爽爽 | 久久久欧美精品sm网站| 视频一区视频二区在线观看| 972aa.com艺术欧美| 国产视频一区二区三区在线观看| 蜜臀av国产精品久久久久| 欧美日韩视频在线一区二区| 日韩一区中文字幕| 国产mv日韩mv欧美| 精品国产乱码久久| 久久精工是国产品牌吗| 在线播放/欧美激情| 午夜久久电影网| 欧美中文字幕一区二区三区亚洲| 亚洲女性喷水在线观看一区| 国产99久久久国产精品潘金网站| 精品福利在线导航| 韩国中文字幕2020精品| 26uuu国产一区二区三区| 久久超碰97人人做人人爱| 日韩一区二区三区四区|