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

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

?? comp_aritdyndict.bas

?? 網(wǎng)上收集的多種加密解密以及壓縮算法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一区二区三区免费野_久草精品视频
在线亚洲精品福利网址导航| 亚洲欧美乱综合| 欧美高清dvd| 欧美综合欧美视频| 91官网在线免费观看| 97精品久久久久中文字幕| 成人做爰69片免费看网站| 国产成人免费视| 福利电影一区二区| 不卡电影免费在线播放一区| 国产成人aaaa| 91在线观看美女| 色婷婷综合中文久久一本| 色偷偷一区二区三区| 欧美日本一区二区在线观看| 欧美一区二区三区色| 精品欧美一区二区三区精品久久| 欧美一区二区免费| 久久先锋资源网| 国产日韩精品视频一区| 国产精品久99| 亚洲午夜影视影院在线观看| 日韩国产欧美在线观看| 轻轻草成人在线| 国产精品亚洲人在线观看| 99麻豆久久久国产精品免费 | 日本vs亚洲vs韩国一区三区二区 | 精品国产欧美一区二区| 久久综合久久99| 中文字幕在线一区免费| 亚洲国产另类精品专区| 麻豆高清免费国产一区| 国产成人精品三级麻豆| 欧美专区日韩专区| 精品国产精品一区二区夜夜嗨| 国产日产精品1区| 亚洲一区二区三区精品在线| 久久丁香综合五月国产三级网站 | 亚洲一区二区三区中文字幕| 麻豆成人综合网| 色婷婷久久综合| 精品国产麻豆免费人成网站| 中文字幕中文字幕中文字幕亚洲无线| 椎名由奈av一区二区三区| 日韩中文字幕区一区有砖一区| 精品一区二区在线观看| 91丨九色丨蝌蚪富婆spa| 91精品国产91热久久久做人人| 国产日产亚洲精品系列| 视频精品一区二区| 97se狠狠狠综合亚洲狠狠| 精品国产免费视频| 视频一区视频二区中文| 91片在线免费观看| 国产欧美日韩另类一区| 久久99精品国产麻豆婷婷洗澡| 91丨porny丨蝌蚪视频| 久久综合色一综合色88| 亚洲午夜视频在线观看| 91日韩精品一区| 中文字幕第一区综合| 久久精品国产色蜜蜜麻豆| 欧美日韩精品一区二区天天拍小说| 国产欧美一二三区| 国产精品一区二区在线播放 | 中文字幕电影一区| 国产资源在线一区| 日韩欧美精品在线| 日韩成人免费看| 欧美日韩激情在线| 一区二区欧美精品| 在线观看日韩毛片| 亚洲另类中文字| 99re这里只有精品视频首页| 国产精品三级久久久久三级| 国产精品综合久久| 国产日韩欧美亚洲| 国产91在线观看| 欧美激情一区在线| 成人av在线观| 中文字幕亚洲不卡| 99综合电影在线视频| 亚洲色大成网站www久久九九| 成人不卡免费av| 亚洲三级在线看| 欧美日韩一区二区在线视频| 亚洲国产美国国产综合一区二区| 欧美无砖专区一中文字| 五月激情六月综合| 欧美成人乱码一区二区三区| 韩国成人福利片在线播放| 久久久久久综合| kk眼镜猥琐国模调教系列一区二区 | 一本色道久久综合亚洲aⅴ蜜桃| 国产精品成人一区二区艾草| 一本大道av一区二区在线播放| 亚洲综合色自拍一区| 91麻豆精品国产自产在线观看一区| 青青草精品视频| 国产日韩欧美综合在线| 色噜噜偷拍精品综合在线| 天天影视涩香欲综合网| 精品国产乱码久久久久久1区2区 | 亚洲精品菠萝久久久久久久| 欧美日韩高清一区二区不卡| 精品在线观看视频| 中文字幕 久热精品 视频在线| 色综合天天综合色综合av| 日韩国产精品91| 国产日韩欧美制服另类| 欧美手机在线视频| 国产麻豆91精品| 亚洲一区二区三区小说| 欧美精品一区男女天堂| 色综合久久久久综合| 麻豆freexxxx性91精品| 亚洲男人天堂av网| 欧美tickling挠脚心丨vk| 欧美性xxxxxx少妇| 日韩精品福利网| 中文字幕欧美国产| 欧美精品欧美精品系列| 成人丝袜18视频在线观看| 亚洲成人av一区二区三区| 国产日韩av一区二区| 欧美日韩在线综合| 成人动漫视频在线| 韩国av一区二区| 午夜精品福利一区二区三区蜜桃| 欧美国产1区2区| 欧美一区二区三区在线观看| 欧美综合视频在线观看| 粉嫩蜜臀av国产精品网站| 久久国产精品第一页| 亚洲第一会所有码转帖| 综合在线观看色| 久久精品亚洲国产奇米99| 欧美一区二区三区成人| 欧美性生活影院| 99精品视频在线免费观看| 国产在线精品一区二区| 琪琪久久久久日韩精品| 亚洲成a人片综合在线| 成人免费小视频| 中文字幕高清不卡| 中文字幕成人网| 国产清纯美女被跳蛋高潮一区二区久久w| 欧美日韩电影在线| 欧美日韩精品一区视频| 欧美日韩情趣电影| 欧美性生活大片视频| 欧美在线免费视屏| 欧美性色综合网| 欧美色图12p| 欧美午夜精品一区二区蜜桃| 欧美性色黄大片| 欧美三级电影在线看| 欧美视频一区二区| 欧美色图片你懂的| 欧美巨大另类极品videosbest | 亚洲国产综合色| 亚洲激情图片一区| 亚洲一区二区三区四区中文字幕| 一区二区三区欧美日| 亚洲第一激情av| 免费在线观看日韩欧美| 精品亚洲国产成人av制服丝袜 | 日韩精品一区第一页| 日本美女视频一区二区| 麻豆91精品视频| 国产乱码精品一区二区三区五月婷 | 久久久三级国产网站| 国产视频911| 亚洲人亚洲人成电影网站色| 亚洲欧美福利一区二区| 亚洲国产精品精华液网站 | 久久网这里都是精品| 中文子幕无线码一区tr| 一区二区三区在线观看动漫| 午夜精品福利在线| 国内欧美视频一区二区| 成人av电影免费在线播放| 欧洲激情一区二区| 日韩三区在线观看| 国产精品乱码一区二三区小蝌蚪| 亚洲精品国产一区二区精华液| 三级久久三级久久久| 国产福利一区在线| 欧美在线视频全部完| 日韩欧美电影一二三| 最新欧美精品一区二区三区| 丝瓜av网站精品一区二区| 国产a视频精品免费观看| 欧美午夜精品免费| 国产午夜精品福利| 亚洲电影你懂得| 福利91精品一区二区三区| 3d动漫精品啪啪一区二区竹菊| 国产精品色噜噜| 免费av成人在线|