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

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

?? comp_aritdyndict.bas

?? 20多種VB軟件的加密與壓縮模塊
?? BAS
字號(hào):
Attribute VB_Name = "Comp_AritDynDict"


Option Explicit
'This is a 1 run method but because we have to store a dictionary
'in front of the compressed stream we can start writing after we have
'compressed the whole file
'so the entire file has to be kept in memory before we can start writing

Private OutStream() As Byte
Private OutPos As Long
Private OutBitCount As Integer
Private OutByteBuf As Byte
Private Const MaxBits As Integer = 24
Private Bits_To_Follow As Integer
Private Const EOF_Symbol = 256
Private CharCount(257) As Long
Private Dictionary As String
Private TempDictionary As String    'needed for decompression
Private Const MaxFrequentie As Integer = 1005

'This is an arithmatic coder with limited dictionary
'compression:
'read a character from the stream
'If not in dictionary then put it there and update the charcount register

Public Sub Compress_ari_ShortDict(ByteArray() As Byte)
    Dim InpPos As Long
    Dim Low As Long
    Dim High As Long
    Dim Range As Long
    Dim Half As Long
    Dim First_Qtr As Long
    Dim Third_Qtr As Long
    Dim Char As Integer
    Dim Index As Integer
    Dim X As Integer
    Call init_Short_Dict_Ari
    Low = 0
    High = (2 ^ MaxBits) - 1
    Half = High / 2
    First_Qtr = Half / 2
    Third_Qtr = Half + First_Qtr
    Char = 0
    Do
        If InpPos > UBound(ByteArray) Then
            Char = Get_Dict_Position(256)
        Else
            Char = Get_Dict_Position(CInt(ByteArray(InpPos)))
        End If
        InpPos = InpPos + 1
        Range = High - Low + 1
        High = Low + Fix(Range * (CharCount(Char) / CharCount(0))) - 1
        Low = Low + Fix(Range * (CharCount(Char + 1) / CharCount(0)))
        Do
            If High < Half Then
                Call Bit_Plus_Follow(0)                 '* Output 0 if in low half. *'
            ElseIf Low >= Half Then                 '* Output 1 if in high half.*'
                Call Bit_Plus_Follow(1)
                Low = Low - Half
                High = High - Half                     '* Subtract offset to top.  *'
            ElseIf Low >= First_Qtr And High < Third_Qtr Then            '* Output an opposite bit   *'
                Bits_To_Follow = Bits_To_Follow + 1              '* later if in middle half. *'
                Low = Low - First_Qtr               '* Subtract offset to middle*'
                High = High - First_Qtr
            Else                                     '* Otherwise exit loop.     *'
                Exit Do
            End If
            Low = 2 * Low
            High = 2 * High + 1        '* Scale up code range.     *'
        Loop
        If Char = Len(Dictionary) Then Exit Do
        Call update_Model(Char)
    Loop
    For X = MaxBits - 1 To 0 Step -1
        If (Low And 2 ^ X) = 0 Then
            Call Bit_Plus_Follow(0)
        Else
            Call Bit_Plus_Follow(1)
        End If
    Next
    Do While OutBitCount > 0
        Call Bit_Plus_Follow(0)
    Loop
    ReDim ByteArray(OutPos + Len(Dictionary))
    InpPos = 0
    ByteArray(InpPos) = Len(Dictionary) - 1
    InpPos = InpPos + 1
    For X = 1 To Len(Dictionary)
        ByteArray(InpPos) = ASC(Mid(Dictionary, X, 1))
        InpPos = InpPos + 1
    Next
    Call CopyMem(ByteArray(InpPos), OutStream(0), OutPos)
End Sub

'Decompress
'read a value with determen a dictionary position
'if this position is occupied get this character
'if not get the first char from the temporary dictionary and put this
'at a new position in the dictionary
'update the value and charcount and repeat the process

Public Sub DeCompress_ari_ShortDict(ByteArray() As Byte)
    Dim InpPos As Long
    Dim InBitPos As Integer
    Dim Low As Long
    Dim High As Long
    Dim Range As Long
    Dim Half As Long
    Dim First_Qtr As Long
    Dim Third_Qtr As Long
    Dim Value As Long
    Dim Char As Integer
    Dim Index As Integer
    Dim Counter As Long
    Dim Temp As Integer
    Dim X As Integer
    Call init_Short_Dict_Ari
'    CharCount(0) = 2            'to correct first settings
'    CharCount(1) = 1
    Value = 0
    InpPos = 1
    InBitPos = 0
    For X = 0 To ByteArray(0)
        TempDictionary = TempDictionary & Chr(ByteArray(InpPos))
        InpPos = InpPos + 1
    Next
    Value = ReadBitsFromArray(ByteArray, InpPos, InBitPos, MaxBits)
    Low = 0
    High = (2 ^ MaxBits) - 1
    Half = High / 2
    First_Qtr = Half / 2
    Third_Qtr = Half + First_Qtr
'    Char = Set_Dict_Position(Char)      'put first character in dictionary
    Char = 0
    Do
        If OutPos = 20 Then
            OutPos = OutPos
        End If
        Range = High - Low + 1
'        Counter = Int((((Value - Low) + 1) * CharCount(0)) / Range)
        Counter = Fix((Value - Low + 1) / Range * CharCount(0))
        For Char = 1 To 256
            If CharCount(Char) <= Counter Then
                Exit For
            End If
        Next
        Char = Char - 1
        Char = Set_Dict_Position(Char)
        If Char = EOF_Symbol Then Exit Do
        High = Low + Fix(Range * (CharCount(Char) / CharCount(0))) - 1
        Low = Low + Fix(Range * (CharCount(Char + 1) / CharCount(0)))
        Do                                  '* Loop to get rid of bits. *'
            If InpPos <= UBound(ByteArray) Then
                If High < Half Then
                    '* nothing *'                       '* Expand low half.         *'
                ElseIf Low >= Half Then                 '* Expand high half.        *'
                    Value = Value - Half
                    Low = Low - Half                      '* Subtract offset to top.  *'
                    High = High - Half
                ElseIf Low >= First_Qtr And High < Third_Qtr Then '* Expand middle half.      *'
                    Value = Value - First_Qtr
                    Low = Low - First_Qtr               '* Subtract offset to middle*'
                    High = High - First_Qtr
                Else                             '* Otherwise exit loop.     *'
                    Exit Do
                End If
                Low = 2 * Low
                High = 2 * High + 1                    '* Scale up code range.     *'
                Value = 2 * Value + ReadBitsFromArray(ByteArray, InpPos, InBitPos, 1)        '* Move in next input bit.  *'
            Else
                Exit Do
            End If
        Loop
        Call update_Model(Char)
        Call AddValueToOutStream(ASC(Mid(Dictionary, Char + 1, 1)))
    Loop
    ReDim ByteArray(OutPos - 1)
    Call CopyMem(ByteArray(0), OutStream(0), OutPos)
End Sub

Private Sub init_Short_Dict_Ari()
    Dim X As Integer
    ReDim OutStream(500)
    OutPos = 0
    OutBitCount = 0
    OutByteBuf = 0
    Bits_To_Follow = 0
    Dictionary = ""
    TempDictionary = ""
    For X = 0 To 256
        CharCount(X) = 0
    Next
    CharCount(0) = 1
    CharCount(1) = 0
End Sub

Private Function Get_Dict_Position(Char As Integer) As Integer
    Dim X As Integer
    If Char < 256 Then
        Get_Dict_Position = InStr(Dictionary, Chr(Char)) - 1
        If Get_Dict_Position >= 0 Then Exit Function 'already in dictionary
        Dictionary = Dictionary & Chr(Char)      'add to dict
        Get_Dict_Position = InStr(Dictionary, Chr(Char)) - 1
    Else
        X = Len(Dictionary)
        Get_Dict_Position = X
    End If
End Function

Private Function Set_Dict_Position(Char As Integer)
    Dim X As Integer
    If Char + 1 <= Len(Dictionary) Then
        Set_Dict_Position = Char
        Exit Function
    End If
    If TempDictionary = "" Then
        Set_Dict_Position = EOF_Symbol
        Exit Function
    End If
    Dictionary = Dictionary & Left(TempDictionary, 1)
    TempDictionary = Right(TempDictionary, Len(TempDictionary) - 1)
    Set_Dict_Position = Len(Dictionary) - 1
End Function

Private Sub update_Model(DictPos As Integer)
    Dim X As Integer, Total As Long
    X = DictPos
    If CharCount(DictPos + 1) = 0 Then CharCount(DictPos + 1) = 1
    For X = DictPos To 0 Step -1
        CharCount(X) = CharCount(X) + 1
        If AritmaticRescale = True Then If CharCount(X) - CharCount(X + 1) > 127 Then Total = 1
    Next
'    If CharCount(0) > MaxFrequentie Then
    If AritmaticRescale = True Then
        If Total = 1 Then
            If CharCount(0) / Len(Dictionary) > 15 Then
                Dim X1 As Long
                X1 = CharCount(Len(Dictionary) + 1)
                For X = Len(Dictionary) + 1 To 1 Step -1
                    Total = Int(CharCount(X - 1) - X1) / 2
                    If Total = 0 Then Total = 1
                    X1 = CharCount(X - 1)
                    CharCount(X - 1) = CharCount(X) + Total
                Next
            End If
        End If
    End If
End Sub

Private Sub Bit_Plus_Follow(Bit As Integer)
    Call AddBitsToOutStream(CLng(Bit), 1)                    '* Output the bit.          *'
    Do While Bits_To_Follow > 0
        Call AddBitsToOutStream(1 - Bit, 1)            '* Output bits_to_follow    *'
        Bits_To_Follow = Bits_To_Follow - 1            '* opposite bits. Set       *'
    Loop                                           '* bits_to_follow to zero.  *'
End Sub

Private Sub AddValueToOutStream(Number As Integer)
    If OutPos > UBound(OutStream) Then ReDim Preserve OutStream(OutPos + 100)
    OutStream(OutPos) = Number
    OutPos = OutPos + 1
End Sub

Private Sub AddBitsToOutStream(Number As Long, Numbits As Integer)
    Dim X As Long
    For X = Numbits - 1 To 0 Step -1
        OutByteBuf = OutByteBuf * 2 + (-1 * ((Number And CDbl(2 ^ X)) > 0))
        OutBitCount = OutBitCount + 1
        If OutBitCount = 8 Then
            OutStream(OutPos) = OutByteBuf
            OutBitCount = 0
            OutByteBuf = 0
            OutPos = OutPos + 1
            If OutPos > UBound(OutStream) Then
                ReDim Preserve OutStream(OutPos + 500)
            End If
        End If
    Next
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

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本久久a久久免费精品不卡| 在线视频国产一区| 亚洲在线观看免费| 26uuu精品一区二区在线观看| 一本大道久久a久久综合| 久久99精品一区二区三区三区| 亚洲欧洲日产国产综合网| 日韩亚洲欧美在线| 91黄色免费观看| 国产成人亚洲精品青草天美 | 亚洲一区二区三区美女| www成人在线观看| 欧美视频一区二区三区| 成人av网在线| 狠狠色丁香久久婷婷综| 天天av天天翘天天综合网色鬼国产| 国产网红主播福利一区二区| 欧美一区二区三级| 欧美午夜视频网站| 色哟哟一区二区在线观看| 成人美女视频在线观看| 国产一区二区三区| 久久99久久精品| 捆绑调教一区二区三区| 日韩成人午夜精品| 亚洲成a人v欧美综合天堂下载 | 中文字幕一区二区三区乱码在线| 日韩精品自拍偷拍| 88在线观看91蜜桃国自产| 91国产免费观看| 91小视频在线观看| av激情成人网| 成人av免费在线观看| 高清在线成人网| 国产成人午夜精品5599| 国产福利一区二区三区视频 | 在线视频一区二区三| av中文一区二区三区| 成人黄色777网| 成人性色生活片| 国产乱对白刺激视频不卡| 国产一区亚洲一区| 国产综合久久久久影院| 国产一区二区三区免费观看| 韩国成人福利片在线播放| 黄色日韩网站视频| 国产精品99久久久久久似苏梦涵| 国产伦精品一区二区三区免费迷| 国产在线精品一区二区夜色| 国产米奇在线777精品观看| 国产精品羞羞答答xxdd| 丁香激情综合国产| 99久久国产综合精品女不卡| 色综合激情久久| 欧美美女bb生活片| 91精品国产综合久久久蜜臀图片| 欧美草草影院在线视频| 亚洲精品一区二区在线观看| 国产日韩av一区| 亚洲另类春色校园小说| 亚洲aⅴ怡春院| 青青草国产成人av片免费| 久久国产免费看| 国产成人免费在线观看不卡| k8久久久一区二区三区| 欧美在线一二三| 欧美白人最猛性xxxxx69交| 日韩精品亚洲一区二区三区免费| 日韩和的一区二区| 国产成人av一区二区| 91欧美一区二区| 91麻豆精品国产91久久久| 久久久久久久电影| 亚洲天堂中文字幕| 日本va欧美va精品发布| 国产精品自拍在线| 91国产福利在线| 精品国产免费人成在线观看| 亚洲丝袜另类动漫二区| 日韩精品欧美精品| 成人免费黄色大片| 欧美一卡2卡三卡4卡5免费| 欧美极品美女视频| 日本最新不卡在线| 北条麻妃国产九九精品视频| 91精品午夜视频| 一区二区中文字幕在线| 久久99精品视频| 91行情网站电视在线观看高清版| 精品免费一区二区三区| 亚洲欧美日韩电影| 国产一区三区三区| 欧美日韩中文字幕一区二区| 国产欧美日韩三区| 日韩成人午夜电影| 色88888久久久久久影院按摩| 日韩欧美一区二区视频| 亚洲乱码日产精品bd| 国产精品一级片在线观看| 欧美日韩五月天| 国产精品对白交换视频| 极品少妇xxxx精品少妇| 欧美日韩亚洲综合一区| 亚洲欧洲性图库| 黄一区二区三区| 欧美一区二区三区公司| 一区二区欧美在线观看| 成人激情开心网| 精品91自产拍在线观看一区| 午夜精品久久久久久久蜜桃app| 成人国产电影网| 久久综合色一综合色88| 免费日本视频一区| 欧美日韩国产另类不卡| 成人国产在线观看| 久久久午夜精品| 男人的j进女人的j一区| 欧美怡红院视频| 亚洲日本电影在线| 成人小视频在线| 久久欧美一区二区| 老汉av免费一区二区三区 | 久久九九久精品国产免费直播| 性做久久久久久| 在线观看成人小视频| 亚洲欧洲精品天堂一级| 成人免费黄色在线| 国产亚洲综合av| 国产91对白在线观看九色| 欧美精品一区二| 免费在线成人网| 欧美一区二区三级| 看电视剧不卡顿的网站| 日韩一区二区三区av| 蜜桃一区二区三区在线观看| 在线不卡欧美精品一区二区三区| 一区二区三区精品| 色成人在线视频| 亚洲国产婷婷综合在线精品| 欧美影院一区二区| 亚洲成人7777| 337p亚洲精品色噜噜狠狠| 日韩不卡一二三区| 欧美mv日韩mv亚洲| 国产精品一区一区三区| 国产日产欧美精品一区二区三区| 国产精品一二三区在线| 亚洲国产精品高清| 91农村精品一区二区在线| 亚洲精品视频一区| 欧美日韩一区二区三区四区| 天天射综合影视| 欧美一区中文字幕| 国内精品视频666| 欧美极品aⅴ影院| 91麻豆高清视频| 亚洲国产裸拍裸体视频在线观看乱了| 欧美性xxxxxxxx| 日本不卡不码高清免费观看 | 一区二区三区四区在线| 在线一区二区视频| 日本视频一区二区三区| 日韩女优电影在线观看| 国产999精品久久久久久绿帽| 中文字幕一区二区三区色视频| 在线观看网站黄不卡| 日本在线观看不卡视频| 国产日韩欧美a| 色狠狠色狠狠综合| 久久99蜜桃精品| 国产精品国产自产拍高清av| 91成人免费电影| 激情丁香综合五月| 亚洲精品乱码久久久久久日本蜜臀| 欧美日韩亚洲另类| 国产精品99久久久久久久vr| 一个色综合av| 久久久久久久久久久久电影| 99国产精品久久久久| 五月天丁香久久| 中文字幕的久久| 666欧美在线视频| 成人理论电影网| 日本人妖一区二区| 中文字幕一区二区三区视频| 91精品久久久久久久久99蜜臂| 成人性视频免费网站| 日本欧美一区二区| 国产精品久久久久四虎| 欧美一区二区三区白人| 色哟哟精品一区| 国产麻豆精品95视频| 亚洲五码中文字幕| 国产亚洲成av人在线观看导航| 欧美日韩午夜在线视频| 99国产精品一区| 狠狠色丁香久久婷婷综合丁香| 亚洲亚洲精品在线观看| 日本一区二区三区高清不卡| 欧美一区二区视频观看视频|