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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? comp_groupsmart.bas

?? 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线电影| 国产三级久久久| 一区二区免费在线| 一本色道久久综合亚洲aⅴ蜜桃| 欧美视频一区二区三区四区| 1区2区3区国产精品| 成人av午夜影院| 国产精品国产精品国产专区不蜜| 狠狠色丁香婷婷综合| 久久综合九色欧美综合狠狠| 韩日欧美一区二区三区| 国产亚洲精品7777| 粉嫩aⅴ一区二区三区四区五区| 欧美精品一区二区三| 国产福利一区二区三区视频在线 | 色悠悠亚洲一区二区| 国产精品精品国产色婷婷| 成人福利视频在线| 亚洲电影一区二区| 精品动漫一区二区三区在线观看| 国产在线精品一区二区不卡了| 欧美激情艳妇裸体舞| 色婷婷久久久亚洲一区二区三区 | av午夜一区麻豆| 亚洲精品中文在线影院| 日韩午夜在线观看视频| 激情综合色丁香一区二区| 国产精品久久久久久久岛一牛影视| 成人三级伦理片| 日日夜夜免费精品视频| 日本一区二区三级电影在线观看 | 精品欧美一区二区三区精品久久| 国产激情视频一区二区在线观看| 亚洲欧洲制服丝袜| 久久久久久亚洲综合影院红桃 | 一本色道久久综合亚洲aⅴ蜜桃 | 国产精品88888| 亚洲一区二区av电影| 久久亚洲综合av| 欧美精品xxxxbbbb| 欧美xxxxx牲另类人与| 欧美日本高清视频在线观看| 国产一区二区精品久久99| 日韩欧美中文字幕精品| 色婷婷狠狠综合| 国产福利91精品一区二区三区| 日韩va欧美va亚洲va久久| 亚洲人妖av一区二区| 国产精品天美传媒沈樵| 亚洲精品一线二线三线| 日韩欧美一区二区在线视频| 欧美日韩亚洲综合一区| 欧美在线观看18| 欧美视频一二三区| 欧美日韩中字一区| 欧美精品日韩综合在线| 欧美一级免费大片| 日韩一卡二卡三卡国产欧美| 日韩欧美中文字幕公布| 精品国产123| 国产欧美一区二区三区在线看蜜臀| 欧美成人免费网站| 日韩一区二区免费电影| 久久综合色播五月| 久久精品夜夜夜夜久久| 亚洲免费观看高清| 亚洲国产日韩一级| 国产自产v一区二区三区c| 国产在线精品一区二区夜色| 成人一二三区视频| 成人av免费在线| 欧美福利电影网| 国产嫩草影院久久久久| 一区二区在线观看不卡| 久久爱www久久做| 99这里只有精品| 日韩精品在线看片z| 国产精品国产三级国产a| 亚洲成人自拍网| 99久久精品国产导航| 欧美一区二区三区的| 国产精品久久久久永久免费观看 | 欧美成人三级电影在线| 日韩理论片中文av| 久久www免费人成看片高清| 91免费视频网址| 久久亚洲精品国产精品紫薇| 亚洲综合区在线| 成人精品一区二区三区四区| 欧美精品一二三四| 亚洲色图视频免费播放| 国产ts人妖一区二区| 日韩亚洲欧美高清| 美美哒免费高清在线观看视频一区二区 | 在线观看91精品国产入口| 国产日韩欧美在线一区| 国产揄拍国内精品对白| 日韩一二在线观看| 日韩电影在线观看网站| 欧美日韩精品福利| 舔着乳尖日韩一区| 欧美日韩另类一区| 午夜伊人狠狠久久| 欧美综合久久久| 午夜欧美在线一二页| 在线播放国产精品二区一二区四区| 亚洲高清不卡在线观看| 欧美日韩国产美女| 蜜臀久久99精品久久久久宅男 | 国产精品久久久久久久久图文区| 国产精品一区二区三区网站| 欧美激情综合在线| 91在线视频观看| 日韩av电影天堂| 久久一日本道色综合| 91免费视频观看| 首页国产欧美久久| 久久久三级国产网站| 成人爱爱电影网址| 天堂资源在线中文精品| 久久久不卡影院| 91精品福利在线| 久久精品国产99久久6| 国产女同互慰高潮91漫画| 在线看国产一区二区| 精品无码三级在线观看视频| 国产精品国产自产拍在线| 欧美一区二区三区不卡| aaa亚洲精品| 国产一区二区毛片| 性久久久久久久久久久久| 国产婷婷色一区二区三区| 色菇凉天天综合网| 国产精品18久久久久久久网站| 一级做a爱片久久| |精品福利一区二区三区| 久久久久国产一区二区三区四区| 在线观看欧美日本| 不卡一区在线观看| 国产乱子轮精品视频| 调教+趴+乳夹+国产+精品| 伊人色综合久久天天人手人婷| 国产欧美视频一区二区| 在线综合视频播放| 91精品国产91久久综合桃花| 9i在线看片成人免费| 成人永久aaa| gogogo免费视频观看亚洲一| 国产成人在线观看| 国产一区二区三区视频在线播放| 婷婷亚洲久悠悠色悠在线播放| 一区二区三区精密机械公司| 亚洲精品va在线观看| 亚洲人快播电影网| 一级特黄大欧美久久久| 美女精品一区二区| 男人的天堂久久精品| 免费成人深夜小野草| 国内精品伊人久久久久av影院 | 欧美精品自拍偷拍| 91精品国产91久久久久久最新毛片| 欧美精品一级二级三级| 2024国产精品视频| ㊣最新国产の精品bt伙计久久| 亚洲人精品午夜| 喷水一区二区三区| 福利视频网站一区二区三区| 91视频com| 26uuu亚洲| 一区二区在线看| 国内成人精品2018免费看| 91网址在线看| 久久精品视频在线看| 一区av在线播放| 成人免费av资源| 欧美二区在线观看| 亚洲视频1区2区| 久久国产精品色婷婷| 欧美在线你懂得| 国产精品嫩草99a| 奇米四色…亚洲| 在线观看网站黄不卡| 中文字幕的久久| 国产精品一线二线三线精华| 日本伊人精品一区二区三区观看方式| 亚洲成av人片一区二区三区| 亚洲va欧美va人人爽午夜| 免费看黄色91| 欧美日韩一区小说| 自拍av一区二区三区| 风间由美一区二区三区在线观看 | 美腿丝袜亚洲三区| 欧美日韩亚洲综合一区二区三区| 国产女主播一区| 国产真实乱对白精彩久久| 日韩欧美aaaaaa| 久久国产生活片100| 日韩午夜激情视频| 免费欧美日韩国产三级电影| 日韩一区二区影院|