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

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

?? comp_paring128.bas

?? 20多種VB軟件的加密與壓縮模塊
?? BAS
字號:
Attribute VB_Name = "Comp_Paring128"


Option Explicit

'This algorithm collect character pairs in a dictionary with the
'most repeated pair in front of the dictionary
'Al characters which are not found as pair will be store as a number < 128.
'A characterpair which is found and has a dictionaryposition below 128
'will be stored as dictionarypos+128
'in order to get all characters < 128 we have to add a byte every 7 bytes
'so add first the file will grow with 12.5%
'after that we start paring and can reach a compressionrate of 50%
'So after a bit of calculation whe can reach a maximum compression rate overall
'of 43.75%

Private Const MaxPairs As Integer = 512
Private Dictionary As String
Private PairCount(MaxPairs) As Long
Private LastPair As Integer
Private FileEncoded As Boolean
Private StrBuffer As String
Private InpPos As Long

Public Sub Compress_Pairs128(ByteArray() As Byte)
    Dim OutStream() As Byte
    Dim OutPos As Long
    Dim Pair As String
    Dim NewPair As String
    Dim DictPos As Integer
    ReDim OutStream(500)
    Call Init_Pair_Count
    NewPair = ""
    Call AddValueToStream(OutStream, OutPos, ParingType)
    Do Until StrBuffer = "" And FileEncoded = True
        If Len(StrBuffer) < 50 And FileEncoded = False Then Call AddDataToStrBuffer(ByteArray)
        Pair = Left(StrBuffer, 2)
        DictPos = 0
        If Len(Pair) = 2 Then
            Do
                DictPos = InStr(DictPos + 1, Dictionary, Pair)
            Loop While (DictPos Mod 2) <> 1 And DictPos > 0
            If DictPos > 256 Then DictPos = 0
        End If
        ' Add the pair's code or the first character to the output.
        If DictPos > 0 Then
            ' The pair is in the dictionary. Add its code to the output.
            Call AddValueToStream(OutStream, OutPos, (DictPos - 1) \ 2 + 128)
            ' Remove pair from the input
            StrBuffer = Mid(StrBuffer, 3)
            NewPair = NewPair & Pair
        Else
            ' The pair is not in the dictionary. Add the first character to the output.
            Call AddValueToStream(OutStream, OutPos, ASC(Pair))
            ' Move past the first character in the input text.
            StrBuffer = Mid(StrBuffer, 2)
            NewPair = NewPair & Left(Pair, 1)
        End If
        Do While Len(NewPair) > 1
'store the pair in the dictionary
            Call AddPairToDictionary(Left(NewPair, 2))
            NewPair = Mid(NewPair, 2)
        Loop
    Loop
    ReDim ByteArray(OutPos - 1)
    Call CopyMem(ByteArray(0), OutStream(0), OutPos)
End Sub

Public Sub DeCompress_Pairs128(ByteArray() As Byte)
    Dim OutStream() As Byte
    Dim OutPos As Long
    Dim Char As String
    Dim TxtToAdd As String
    Dim Pair As String
    Dim Temp As String
    Dim OutBuf As String
    Dim DictPos As Integer
    Dim X As Integer
    ReDim OutStream(500)
    Call Init_Pair_Count
    Pair = ""
    ParingType = ReadValue(ByteArray, InpPos)
    Do Until StrBuffer = "" And FileEncoded = True
'read the buffer
        Do While Len(StrBuffer) < 8 And FileEncoded = False
            Temp = ReadValue(ByteArray, InpPos)
            StrBuffer = StrBuffer & Chr(Temp)
        Loop
'read until whe have 4 codes
        Do While StrBuffer <> "" And Len(OutBuf) < 8
            Char = Left(StrBuffer, 1)
            If ASC(Char) > 127 Then
'whe found a pair
                Char = Mid$(Dictionary, (ASC(Char) - 128) * 2 + 1, 2)
            End If
            Pair = Pair + Char
            Do While Len(Pair) > 1
'add the pair to the dictionary
                Call AddPairToDictionary(Left(Pair, 2))
                Pair = Mid(Pair, 2)
            Loop
            OutBuf = OutBuf & Char
            StrBuffer = Mid(StrBuffer, 2)
        Loop
'decode the 4 codes into 3 bytes
        Temp = DecodeStrBuffer(OutBuf)
'and store them in the outpus stream
        For X = 1 To Len(Temp)
            Call AddValueToStream(OutStream, OutPos, ASC(Mid(Temp, X, 1)))
        Next
        OutBuf = Mid(OutBuf, 9)
    Loop
    ReDim ByteArray(OutPos - 1)
    Call CopyMem(ByteArray(0), OutStream(0), OutPos)
End Sub
Private Sub Init_Pair_Count()
    Dim X As Integer
    Dim Y As Integer
    For X = 0 To MaxPairs
        PairCount(X) = 0
    Next
    Dictionary = String(MaxPairs * 2 + 2, 255)
    LastPair = 0
    StrBuffer = ""
    FileEncoded = False
    InpPos = 0
End Sub

Private Sub AddPairToDictionary(Pair As String)
    Dim DictPos As Integer
    Dim PairPos As Integer
    Dim NewPos As Integer
    Dim Temp As Long
    DictPos = 0
'check if the pair is already in the dictionary
    Do
        DictPos = InStr(DictPos + 1, Dictionary, Pair)
    Loop While (DictPos Mod 2) <> 1 And DictPos > 0
    If DictPos > 0 Then
'update the dictionary and put the pair into its proper place
        PairPos = (DictPos - 1) / 2
        PairCount(PairPos) = PairCount(PairPos) + 1
        Do While PairPos > 0
            If PairCount(PairPos) >= PairCount(PairPos - 1) Then
                Temp = PairCount(PairPos - 1)
                PairCount(PairPos - 1) = PairCount(PairPos)
                PairCount(PairPos) = Temp
                PairPos = PairPos - 1
            Else
                Exit Do
            End If
        Loop
        NewPos = PairPos * 2 + 1
        If NewPos = DictPos Then Exit Sub
        Dictionary = Left(Dictionary, NewPos - 1) & Pair & Mid(Dictionary, NewPos, DictPos - NewPos) & Mid(Dictionary, DictPos + 2)
    Else
        If LastPair < MaxPairs Then
'store the new found pair at the end of the dictionary
            Mid(Dictionary, LastPair * 2 + 1, 2) = Pair
            PairCount(LastPair) = 1
            LastPair = LastPair + 1
            Exit Sub
        End If
'find the first lowest paircount and remove them while inserting the new one
        Temp = PairCount(MaxPairs)
        NewPos = MaxPairs * 2 + 1
        For PairPos = MaxPairs To 0 Step -1
            If PairCount(PairPos) > Temp Then
                NewPos = PairPos * 2 + 1
                Exit For
            End If
        Next
        Dictionary = Left(Dictionary, NewPos - 1) & Mid(Dictionary, NewPos + 2) & Pair
    End If
End Sub

'this code is used to get a value between 0 to 64
Private Sub AddDataToStrBuffer(FromArray() As Byte)
'    Dim c1, c2, c3 As Integer
    Dim Char As Integer
    Dim X As Integer
    Dim w As Integer
    If ParingType = 0 Then
        Do While Len(StrBuffer) < 200 And FileEncoded = False
            X = 1: w = 0
            Do While X < 8 And FileEncoded = False
                Char = ReadValue(FromArray, InpPos)
                If Char > 127 Then w = w + (2 ^ (7 - X))
                StrBuffer = StrBuffer & Chr(Char And 127)
                X = X + 1
            Loop
            StrBuffer = StrBuffer & Chr(w)
        Loop
    Else
        Do While Len(StrBuffer) < 200 And FileEncoded = False
            X = 1: w = 0
            Do While X < 8 And FileEncoded = False
                Char = ReadValue(FromArray, InpPos)
                w = w + Int(Char / 2 ^ X)
                StrBuffer = StrBuffer & Chr(w)
                w = (Char And ((2 ^ X) - 1)) * (2 ^ (7 - X))
                X = X + 1
            Loop
            StrBuffer = StrBuffer & Chr(w)
        Loop
    End If
End Sub

'this code is used to restore the original values
Private Function DecodeStrBuffer(Text As String) As String
    Dim X As Integer
    Dim w As Integer
    Dim Char As Integer
    If ParingType = 0 Then
        If Len(Text) > 7 Then
            w = ASC(Mid(Text, 8, 1))
        Else
            w = ASC(Mid(Text, Len(Text), 1))
        End If
        X = 1
        Do While X < 8 And X < Len(Text)
            Char = ASC(Mid$(Text, X, 1))
            If (w And (2 ^ (7 - X))) > 0 Then Char = Char + 128
            DecodeStrBuffer = DecodeStrBuffer & Chr(Char)
            X = X + 1
        Loop
    Else
        X = 2
        w = ASC(Mid(Text, 1, 1)) * 2  '(2^1)
        Do While X < 9 And X <= Len(Text)
            Char = ASC(Mid$(Text, X, 1))
            w = w + Int(Char / (2 ^ (8 - X)))
            DecodeStrBuffer = DecodeStrBuffer & Chr(w)
            w = (Char * (2 ^ X)) And 255
            X = X + 1
        Loop
    End If
End Function

Private Function ReadValue(FromArray() As Byte, FromPos As Long) As Integer
    If FromPos < UBound(FromArray) Then
        ReadValue = FromArray(FromPos)
    Else
        If FromPos = UBound(FromArray) Then
            ReadValue = FromArray(FromPos)
        Else
            ReadValue = -1
        End If
        FileEncoded = True
    End If
    FromPos = FromPos + 1
End Function

Private Sub AddValueToStream(ToStream() As Byte, ToPos As Long, Number As Byte)
    If ToPos > UBound(ToStream) Then ReDim Preserve ToStream(ToPos + 100)
    ToStream(ToPos) = Number
    ToPos = ToPos + 1
End Sub

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品成人一区二区三区四区| 丝袜脚交一区二区| 亚洲观看高清完整版在线观看| 日韩二区三区四区| 91丨porny丨最新| 日韩欧美一级二级三级久久久| 国产女人水真多18毛片18精品视频| 午夜av一区二区三区| 成人激情视频网站| 精品国产乱子伦一区| 亚洲伊人色欲综合网| eeuss影院一区二区三区| 日韩女优av电影在线观看| 亚洲一二三区在线观看| 播五月开心婷婷综合| 久久久亚洲精品一区二区三区| 婷婷综合久久一区二区三区| 91丨国产丨九色丨pron| 国产精品久久免费看| 国产福利精品导航| 久久久久免费观看| 久久精品久久久精品美女| 欧美视频日韩视频| 亚洲三级小视频| 99免费精品在线| 中文字幕精品综合| 国产精品一二三四区| 欧美成人一区二区三区片免费| 五月激情六月综合| 欧美伊人久久大香线蕉综合69| 亚洲色图制服丝袜| 93久久精品日日躁夜夜躁欧美| 精品福利在线导航| 国内精品伊人久久久久av影院| 欧美电影免费观看高清完整版| 强制捆绑调教一区二区| 欧美一级欧美一级在线播放| 日韩电影在线一区二区三区| 制服丝袜亚洲精品中文字幕| 亚洲成a人v欧美综合天堂下载| 在线影视一区二区三区| 洋洋成人永久网站入口| 91久久精品一区二区| 一区二区三区在线高清| 日本大香伊一区二区三区| 亚洲一区二区精品视频| 欧美体内she精视频| 日韩av网站在线观看| 日韩一区二区在线看| 久久精品久久综合| 国产丝袜欧美中文另类| 国产91高潮流白浆在线麻豆| 中文字幕一区二区三区精华液 | 99re视频精品| 最新国产精品久久精品| 日本道色综合久久| 日韩高清在线电影| 久久久99精品免费观看不卡| 成人app在线| 一区二区三区国产豹纹内裤在线| 欧美高清激情brazzers| 久久se这里有精品| 国产精品久久久久毛片软件| 欧美日韩一区三区四区| 国内成人自拍视频| 亚洲婷婷在线视频| 制服视频三区第一页精品| 国产在线精品一区二区夜色| 中文欧美字幕免费| 欧美日韩一区久久| 国产成人综合亚洲网站| 一区二区三区欧美在线观看| 日韩免费视频一区二区| 91老师国产黑色丝袜在线| 日日摸夜夜添夜夜添国产精品| 国产欧美日韩在线| 在线综合视频播放| 91无套直看片红桃| 精品一区二区三区欧美| 亚洲精选视频在线| 精品sm捆绑视频| 在线视频一区二区免费| 国产盗摄一区二区| 五月激情六月综合| 亚洲人成在线播放网站岛国| 日韩午夜激情电影| 一本高清dvd不卡在线观看| 久久99久久99精品免视看婷婷| 亚洲在线视频免费观看| 国产清纯白嫩初高生在线观看91| 欧美欧美欧美欧美首页| 成人免费高清视频| 精品一区二区三区久久| 亚洲国产精品久久一线不卡| 中文字幕欧美三区| 欧美精品一区二区三区久久久| 在线中文字幕一区| 99久久久久久| 国产福利不卡视频| 国产一区二区看久久| 日韩中文字幕av电影| 亚洲一级二级三级| 亚洲女同女同女同女同女同69| 国产欧美一区二区精品仙草咪| 日韩欧美在线不卡| 777久久久精品| 欧美最猛性xxxxx直播| av网站一区二区三区| www.亚洲人| jvid福利写真一区二区三区| 粉嫩一区二区三区性色av| 国产一区欧美一区| 精品一区免费av| 秋霞国产午夜精品免费视频| 午夜精品在线看| 日日摸夜夜添夜夜添亚洲女人| 午夜成人免费电影| 日韩电影在线免费| 久久成人18免费观看| 免费观看日韩av| 久久精品av麻豆的观看方式| 美女精品自拍一二三四| 久久精品噜噜噜成人88aⅴ| 久久疯狂做爰流白浆xx| 国产精品一区二区视频| 国产剧情av麻豆香蕉精品| 国产精品一卡二卡| 国产成a人亚洲精品| 成人免费毛片嘿嘿连载视频| 欧美巨大另类极品videosbest| 欧美亚洲国产一区二区三区va| 欧美视频一区二区在线观看| 欧美群妇大交群的观看方式| 欧美一卡二卡在线| 久久一日本道色综合| 国产欧美日韩另类一区| 亚洲欧洲三级电影| 亚洲伊人色欲综合网| 日韩国产在线观看一区| 久草在线在线精品观看| 国产综合色产在线精品| av综合在线播放| 欧美精品在线一区二区| 欧美精品一区二区三区一线天视频| 国产亚洲一区二区三区四区| 综合在线观看色| 日本女人一区二区三区| 成人网在线免费视频| 在线看国产一区二区| 日韩欧美在线不卡| 中文字幕色av一区二区三区| 亚洲午夜影视影院在线观看| 久久精品国产精品亚洲综合| 91一区二区在线| 日韩欧美在线影院| 亚洲女与黑人做爰| 久久91精品国产91久久小草| 99国产精品久久| 欧美r级在线观看| 亚洲日本乱码在线观看| 精品无人区卡一卡二卡三乱码免费卡| 成人动漫中文字幕| 777欧美精品| 亚洲精品视频在线| 国产精品18久久久久久久久 | 欧美视频一区在线| 久久久国产综合精品女国产盗摄| 亚洲影院免费观看| 国产成人免费视频网站 | 欧美成人精精品一区二区频| 亚洲色图清纯唯美| 韩国精品一区二区| 欧美日韩久久一区| 国产精品久久精品日日| 精品无码三级在线观看视频| 欧美色视频在线观看| 17c精品麻豆一区二区免费| 久久精品国产色蜜蜜麻豆| 欧美无砖砖区免费| 狠狠久久亚洲欧美| 欧美午夜一区二区三区免费大片| 国产精品午夜在线| 国产一区二区剧情av在线| 91麻豆精品国产自产在线观看一区 | 欧美日韩在线亚洲一区蜜芽| 日韩高清一区二区| 国产精品成人在线观看| 日韩一区二区麻豆国产| 亚洲美女淫视频| 成人av电影在线| 国产视频一区二区在线| 久久黄色级2电影| 欧美一区二区三区爱爱| 午夜欧美一区二区三区在线播放| 91麻豆国产在线观看| 国产精品久久久久影视| 成人手机电影网| 国产欧美日韩久久| 春色校园综合激情亚洲| 国产无人区一区二区三区|