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

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

?? comp_aritdyndict.bas

?? 常用加密算法用VB來實現(xiàn)
?? BAS
字號:
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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品中文字幕欧美| 香港成人在线视频| 精品一区二区三区视频| 欧美一二三区在线| 国产综合久久久久久久久久久久| 日韩精品一区二| 麻豆91精品视频| 精品国产乱子伦一区| 国产精品一区三区| 日本一区二区不卡视频| 色综合中文字幕国产 | 国产欧美日韩另类一区| 国产福利一区在线| 国产精品二区一区二区aⅴ污介绍| 99免费精品视频| 亚洲欧美另类综合偷拍| 欧美日本视频在线| 久久精品99国产精品日本| 久久久精品免费观看| 成人精品小蝌蚪| 亚洲欧美日本在线| 91偷拍与自偷拍精品| 亚洲女性喷水在线观看一区| 欧美三级视频在线| 久久电影国产免费久久电影| 国产欧美日韩精品a在线观看| 99精品一区二区三区| 亚洲妇女屁股眼交7| 日韩一级在线观看| 成人视屏免费看| 亚洲午夜精品网| 精品成人私密视频| 91黄色小视频| 久久99国内精品| 亚洲视频一区二区在线观看| 91精品一区二区三区久久久久久| 国产成人午夜电影网| 亚洲国产精品一区二区尤物区| 久久久欧美精品sm网站| 欧美午夜视频网站| 成人午夜激情在线| 日韩精品国产欧美| 国产精品久久网站| 欧美不卡一区二区| 日本道免费精品一区二区三区| 久久99精品国产麻豆婷婷| 亚洲欧美一区二区三区久本道91| 欧美一区二区网站| 99久久免费精品高清特色大片| 丝袜亚洲精品中文字幕一区| 久久久精品影视| 欧美一区二区二区| 欧美在线播放高清精品| 国产成人综合在线观看| 日本三级韩国三级欧美三级| 国产精品国产a| www成人在线观看| 欧美喷水一区二区| 97精品久久久午夜一区二区三区| 韩国精品主播一区二区在线观看 | 亚洲成av人片一区二区三区 | 中文字幕不卡在线观看| 91精品国产综合久久精品| 色哟哟国产精品免费观看| 风流少妇一区二区| 国产一区二区成人久久免费影院| 亚洲成av人片观看| 亚洲一区二区三区视频在线 | 日韩女优av电影| 欧美老肥妇做.爰bbww| 色一区在线观看| 成人黄色av电影| 国产成人精品亚洲777人妖| 国产自产2019最新不卡| 男女性色大片免费观看一区二区 | 欧美性xxxxx极品少妇| 91日韩在线专区| 成人动漫一区二区在线| 成人激情小说乱人伦| 国产成a人无v码亚洲福利| 激情久久五月天| 国内偷窥港台综合视频在线播放| 蜜桃一区二区三区四区| 蜜桃视频一区二区| 日本中文一区二区三区| 日精品一区二区三区| 石原莉奈在线亚洲二区| 日韩精品91亚洲二区在线观看| 五月激情丁香一区二区三区| 亚洲综合在线视频| 亚洲国产日韩一级| 午夜精品视频一区| 免费视频最近日韩| 国产在线观看免费一区| 国产夫妻精品视频| av中文一区二区三区| 色视频欧美一区二区三区| 在线观看网站黄不卡| 在线不卡中文字幕播放| 欧美一级片免费看| 久久精品视频在线免费观看| 欧美激情资源网| 亚洲精品v日韩精品| 天天色图综合网| 麻豆精品久久精品色综合| 国产麻豆精品视频| 91亚洲精品一区二区乱码| 欧美日韩一区二区不卡| 欧美一区二区三区视频免费| 欧美精品一区二| 中文字幕第一页久久| 亚洲男人的天堂av| 日本午夜精品一区二区三区电影| 国产呦精品一区二区三区网站| 懂色av一区二区在线播放| 99热99精品| 日韩一区二区精品葵司在线| 26uuu欧美日本| 中文字幕一区二区不卡| 亚洲成人av中文| 国产一区二三区| 色视频成人在线观看免| 欧美大白屁股肥臀xxxxxx| 国产精品电影一区二区三区| 五月天久久比比资源色| 黄页网站大全一区二区| 日本久久电影网| 欧美草草影院在线视频| 一区二区三区四区精品在线视频| 日本美女一区二区三区| 成人黄色电影在线| 欧美一级免费大片| 亚洲欧洲日韩综合一区二区| 男女男精品视频| 91丨九色丨蝌蚪丨老版| 欧美不卡一区二区| 亚洲一区中文在线| 国产剧情一区二区三区| 欧美在线观看禁18| 欧美激情一区二区在线| 蜜臀精品久久久久久蜜臀| 91视频一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 亚洲激情在线激情| 成人开心网精品视频| 欧美一级夜夜爽| 视频一区国产视频| 欧美自拍丝袜亚洲| 国产精品久久久久影院| 激情小说欧美图片| 777色狠狠一区二区三区| 国产精品久久久久久久久免费樱桃| 美女视频黄 久久| 欧美性做爰猛烈叫床潮| 亚洲精品成人天堂一二三| 成人久久18免费网站麻豆| 久久久国产精华| 激情文学综合丁香| 日韩欧美成人激情| 日本美女一区二区| 69堂亚洲精品首页| 亚洲成人一区在线| 91久久免费观看| 最近日韩中文字幕| av午夜精品一区二区三区| 亚洲国产成人一区二区三区| 九九久久精品视频| 欧美videossexotv100| 久久精品国产99国产精品| 欧美日韩精品欧美日韩精品一| 亚洲欧洲精品一区二区精品久久久| 国产一区二区三区观看| 欧美一二三四区在线| 日韩av在线免费观看不卡| 91黄色免费观看| 樱桃视频在线观看一区| 波多野结衣的一区二区三区| 国产清纯在线一区二区www| 免费日本视频一区| 欧美久久久久久蜜桃| 欧美极品xxx| 色综合天天性综合| 亚洲欧美怡红院| 成人h动漫精品| 亚洲免费看黄网站| av激情成人网| 国产精品久久久久国产精品日日| 久久99精品国产麻豆婷婷| 久久久亚洲午夜电影| 国产一区福利在线| 久久综合精品国产一区二区三区 | 中文字幕不卡在线| 成人激情免费视频| 久久久国产精品午夜一区ai换脸| voyeur盗摄精品| 国产精品久久久久久久浪潮网站| proumb性欧美在线观看| 亚洲大片精品永久免费| 在线成人av网站| 麻豆国产精品777777在线|