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

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

?? comp_reducerpre.bas

?? 網上收集的多種加密解密以及壓縮算法vb源碼。
?? BAS
字號:
Attribute VB_Name = "Comp_ReducerPre"


Option Explicit

'This is a 1 run method but we have to keep the whole contents
'in memory until some variables are saved wich are needed bij the decompressor

'This compressor makes use of a dictionary and code the ascii character
'to the position it is located in
'for every character it has to store a header and location
'there are 7 headers which will tell yo the amount of bits to read
'for the location
'example:
'header :   positions
'   0   :   0/1
'   1   :   2/3/4/5
'   2   :   6/7/8/9/10/11/12/13
'   3   :   14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29
'   etc'etc
'The header will have 1,2 or 3 bits depending on the numbers of chars to compress
'The dictionary is build up from the most common char to the least common char
'if as char must be stored which is the 6'ed most common char in the dictionary
'then the posiotion in the dictionary will be 6 but since we start the
'the value 0 the position will be 6-1=5
'5 will fall within the range of header 1
'so the headerbits will be 001 with will tell us to store 2 bits more
'for the position of the char
'since header 1 start with position 2 we can substract this from the
'actual position 5-2=3 which can be stored in 2 bits 11
'so the code to store the 6'ed character wil be 001 11
'since this reducer have a predefined header the header bits will
'be stored in the shortest posible way
'this reducer don't have to store the dictionary into te output stream
'cause it will be created on the flow

Private Type BytePos
    Data() As Byte
    Position As Long
    Buffer As Integer
    BitPos As Integer
End Type
Private Stream(1) As BytePos    '0=control 1=BitStreams

Private CharCount(256) As Long

Private Dictionary As String
Private BitsForHeader As Integer   '1=max 6 chars  2=max 30 chars  3=more then 30 chars
Private Pre(8) As Integer
Private RetPre() As Integer
Private BitsToFollow(8) As Integer
Private PreCase As Integer
Private MinBitsToRead As Integer

Private Sub Init_ReducerDynamicPre()
    Dim X As Integer
'   controller bits 000-111 for 1 to 8 which tel the numbers of bits to read
'   bits to store
'   2 * 1 bit
'   4 * 2 bits
'   2^? bits * ? bits
'
'   256 characters can be stored in
'   2*1+4*2+8*3+16*4+32*5+64*6+128*7+2*8 bits + 256 * 3 controlerbits
    Dictionary = ""
    For X = 0 To 255
        Dictionary = Dictionary & Chr(X)
        CharCount(X) = 0
    Next
    CharCount(256) = 0
    BitsForHeader = 3
    For X = 0 To 1
        ReDim Stream(X).Data(500)
        Stream(X).BitPos = 0
        Stream(X).Buffer = 0
        Stream(X).Position = 0
    Next
    Select Case PreCase
    Case 1
        ReDim RetPre(31)
        MinBitsToRead = 1
        Pre(1) = 0: BitsToFollow(1) = 1    '0
        Pre(2) = 4: BitsToFollow(2) = 3    '100
        Pre(3) = 5: BitsToFollow(3) = 3    '101
        Pre(4) = 12: BitsToFollow(4) = 4   '1100
        Pre(5) = 13: BitsToFollow(5) = 4   '1101
        Pre(6) = 14: BitsToFollow(6) = 4   '1110
        Pre(7) = 30: BitsToFollow(7) = 5   '11110
        Pre(8) = 31: BitsToFollow(8) = 5   '11111
        For X = 0 To 31
            RetPre(X) = 0
        Next
        RetPre(0) = 1
        RetPre(4) = 2
        RetPre(5) = 3
        RetPre(12) = 4
        RetPre(13) = 5
        RetPre(14) = 6
        RetPre(30) = 7
        RetPre(31) = 8
    Case 2
        ReDim RetPre(63)
        MinBitsToRead = 2
        Pre(1) = 0: BitsToFollow(1) = 2    '00
        Pre(2) = 1: BitsToFollow(2) = 2    '01
        Pre(3) = 2: BitsToFollow(3) = 2    '10
        Pre(4) = 6: BitsToFollow(4) = 3    '110
        Pre(5) = 14: BitsToFollow(5) = 4   '1110
        Pre(6) = 30: BitsToFollow(6) = 5   '11110
        Pre(7) = 62: BitsToFollow(7) = 6   '111110
        Pre(8) = 63: BitsToFollow(8) = 6   '111111
        For X = 0 To 63
            RetPre(X) = 0
        Next
        RetPre(0) = 1
        RetPre(1) = 2
        RetPre(2) = 3
        RetPre(6) = 4
        RetPre(14) = 5
        RetPre(30) = 6
        RetPre(62) = 7
        RetPre(63) = 8
    Case 3
        ReDim RetPre(127)
        MinBitsToRead = 1
        Pre(1) = 0: BitsToFollow(1) = 1    '0
        Pre(2) = 2: BitsToFollow(2) = 2    '10
        Pre(3) = 6: BitsToFollow(3) = 3    '110
        Pre(4) = 14: BitsToFollow(4) = 4   '1110
        Pre(5) = 30: BitsToFollow(5) = 5   '11110
        Pre(6) = 62: BitsToFollow(6) = 6   '111110
        Pre(7) = 126: BitsToFollow(7) = 7  '1111110
        Pre(8) = 127: BitsToFollow(8) = 7  '1111111
        For X = 0 To 63
            RetPre(X) = 0
        Next
        RetPre(0) = 1
        RetPre(2) = 2
        RetPre(6) = 3
        RetPre(14) = 4
        RetPre(30) = 5
        RetPre(62) = 6
        RetPre(126) = 7
        RetPre(127) = 8
    End Select
End Sub

Public Sub Compress_ReducerDynamicPre(ByteArray() As Byte, Optional PreSelect As Integer = 2)
    Dim X As Long
    Dim Y As Long
    Dim NoMore As Boolean
    Dim Most As Long
    Dim NewFileLen As Long
    Dim Nuchar As Byte
    Dim CharCount(255) As Long
    PreCase = PreSelect
    Call Init_ReducerDynamicPre
'whe only read the stream and convert them to bitstreams
    For X = 0 To UBound(ByteArray)
        Call AddValueToStream(CInt(ByteArray(X)))
    Next
'send the EOF-marker
    Call AddValueToStream(256)
'lets fill the leftovers
    For X = 0 To 1
        Do While Stream(X).BitPos > 0
            Call AddBitsToStream(Stream(X), 0, 1)
        Loop
    Next
'Lets restore the bounderies
    For X = 0 To 1
        ReDim Preserve Stream(X).Data(Stream(X).Position - 1)
    Next
'whe calculate the new length of the new data
    NewFileLen = 0
    For X = 0 To 1
        NewFileLen = NewFileLen + UBound(Stream(X).Data) + 1
    Next
    ReDim ByteArray(NewFileLen + 3)
'here we store the compressed data
    NewFileLen = 0
    For X = 0 To 0
        ByteArray(NewFileLen) = Int(UBound(Stream(X).Data) / &H10000) And &HFF
        NewFileLen = NewFileLen + 1
        ByteArray(NewFileLen) = Int(UBound(Stream(X).Data) / &H100) And &HFF
        NewFileLen = NewFileLen + 1
        ByteArray(NewFileLen) = UBound(Stream(X).Data) And &HFF
        NewFileLen = NewFileLen + 1
    Next
    For X = 0 To 1
        For Y = 0 To UBound(Stream(X).Data)
            ByteArray(NewFileLen) = Stream(X).Data(Y)
            NewFileLen = NewFileLen + 1
        Next
    Next
End Sub

Public Sub DeCompress_ReducerDynamicPre(ByteArray() As Byte, Optional PreSelect As Integer = 2)
    Dim OutStream() As Byte
    Dim OutPos As Long
    Dim InposCont As Long
    Dim InContBit As Integer
    Dim InposData As Long
    Dim InDataBit As Integer
    Dim Char As Integer
    Dim Numbits As Integer
    Dim X As Long
    Dim Temp As Byte
    ReDim OutStream(500)
    PreCase = PreSelect
    Call Init_ReducerDynamicPre
    InposCont = 0
    InposData = 0
    For X = 0 To 2
        InposData = CLng(InposData) * 256 + ByteArray(InposCont)
        InposCont = InposCont + 1
    Next
    InposData = InposData + InposCont + 1
    InContBit = 0
    InDataBit = 0
    OutPos = 0
    Do
        Numbits = 0
        Temp = 0
        For X = 1 To MinBitsToRead
            Temp = Temp * 2 + ReadBitsFromArray(ByteArray, InposCont, InContBit, 1)
        Next
        Do While RetPre(Temp) = 0
            Temp = Temp * 2 + ReadBitsFromArray(ByteArray, InposCont, InContBit, 1)
        Loop
        Numbits = RetPre(Temp)
        Char = ReadBitsFromArray(ByteArray, InposData, InDataBit, Numbits)
        Char = ExpanderBits(Numbits, Char)
        If Char = 256 Then Exit Do
        Call AddCharToArray(OutStream, OutPos, CByte(Char))
    Loop
    ReDim ByteArray(OutPos - 1)
    For X = 0 To OutPos - 1
        ByteArray(X) = OutStream(X)
    Next
End Sub

Private Function ReducerBits(Char As Integer) As Integer
    Dim DiPos As Integer
    Dim TotPos As Integer
    Dim Y As Integer
    If Char = 256 Then ReducerBits = 8: Char = 255: Exit Function
    DiPos = InStr(Dictionary, Chr(Char)) - 1
    Call update_Model(Char)
    For Y = 1 To 8
        If DiPos >= TotPos And DiPos < TotPos + 2 ^ Y Then
            ReducerBits = Y
            Char = DiPos - TotPos
            Exit Function
        End If
        TotPos = TotPos + 2 ^ Y
    Next
End Function

Private Function ExpanderBits(BitsNum As Integer, BytePos As Integer) As Integer
    If BitsNum = 8 And BytePos = 255 Then ExpanderBits = 256: Exit Function
    Dim TotPos As Integer
    Dim Y As Integer
    For Y = 1 To BitsNum - 1
        TotPos = TotPos + 2 ^ Y
    Next
    TotPos = TotPos + BytePos + 1
    ExpanderBits = ASC(Mid(Dictionary, TotPos, 1))
    Call update_Model(ExpanderBits)
End Function

Private Sub update_Model(Char As Integer)
    Dim DictPos As Integer
    Dim OldPos As Integer
    Dim Temp As Long
    DictPos = InStr(Dictionary, Chr(Char))
    OldPos = DictPos
    CharCount(DictPos) = CharCount(DictPos) + 1
    Do While DictPos > 1 And CharCount(DictPos) >= CharCount(DictPos - 1)
        Temp = CharCount(DictPos - 1)
        CharCount(DictPos - 1) = CharCount(DictPos)
        CharCount(DictPos) = Temp
        DictPos = DictPos - 1
    Loop
    If OldPos = DictPos Then Exit Sub
    Dictionary = Left(Dictionary, DictPos - 1) & Chr(Char) & Mid(Dictionary, DictPos, OldPos - DictPos) & Mid(Dictionary, OldPos + 1)
End Sub

Private Sub AddValueToStream(Number As Integer)
    Dim BitsDeep As Integer
    BitsDeep = ReducerBits(Number)
    Call AddBitsToStream(Stream(0), Pre(BitsDeep), BitsToFollow(BitsDeep))
    Call AddBitsToStream(Stream(1), Number, BitsDeep)
End Sub

'this sub will add an amount of bits to a sertain stream
Private Sub AddBitsToStream(Toarray As BytePos, Number As Integer, Numbits As Integer)
    Dim X As Long
    If Numbits = 8 And Toarray.BitPos = 0 Then
        If Toarray.Position > UBound(Toarray.Data) Then ReDim Preserve Toarray.Data(Toarray.Position + 500)
        Toarray.Data(Toarray.Position) = Number And &HFF
        Toarray.Position = Toarray.Position + 1
        Exit Sub
    End If
    For X = Numbits - 1 To 0 Step -1
        Toarray.Buffer = Toarray.Buffer * 2 + (-1 * ((Number And 2 ^ X) > 0))
        Toarray.BitPos = Toarray.BitPos + 1
        If Toarray.BitPos = 8 Then
            If Toarray.Position > UBound(Toarray.Data) Then ReDim Preserve Toarray.Data(Toarray.Position + 500)
            Toarray.Data(Toarray.Position) = Toarray.Buffer
            Toarray.BitPos = 0
            Toarray.Buffer = 0
            Toarray.Position = Toarray.Position + 1
        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

'this sub will add a char into the outputstream
Private Sub AddCharToArray(Toarray() As Byte, ToPos As Long, Char As Byte)
    If ToPos > UBound(Toarray) Then ReDim Preserve Toarray(ToPos + 500)
    Toarray(ToPos) = Char
    ToPos = ToPos + 1
End Sub

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片| 日本韩国欧美国产| 99精品偷自拍| 欧美一级午夜免费电影| 亚洲欧洲成人精品av97| 美国av一区二区| 色吧成人激情小说| 久久久一区二区三区| 美国欧美日韩国产在线播放| av电影在线不卡| 国产精品久久久久三级| 日产国产高清一区二区三区| 91色|porny| 国产精品欧美一区二区三区| 精一区二区三区| 69精品人人人人| 亚洲午夜成aⅴ人片| 91视频在线观看| 国产日韩精品一区二区三区在线| 人妖欧美一区二区| 欧美人狂配大交3d怪物一区| 综合自拍亚洲综合图不卡区| av在线不卡网| 中文字幕电影一区| 国产成人精品亚洲日本在线桃色 | 亚洲一区在线视频| www.亚洲国产| 国产精品欧美一级免费| 国产精品一区二区三区四区| 日韩女优视频免费观看| 亚洲一区二区三区四区在线| 在线观看日韩电影| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国产suv精品一区二区883| 精品电影一区二区三区 | 亚洲成人一区在线| 色综合久久66| 亚洲少妇30p| 9i看片成人免费高清| 国产精品婷婷午夜在线观看| av影院午夜一区| 亚洲精品久久嫩草网站秘色| 91小视频免费观看| 亚洲一级二级三级在线免费观看| 欧美无砖专区一中文字| 天天操天天色综合| 日韩一区二区免费在线观看| 九九九精品视频| 国产精品二区一区二区aⅴ污介绍| 国产91丝袜在线18| 国产精品欧美久久久久一区二区| 色综合久久久久综合| 午夜精品福利视频网站| 欧美本精品男人aⅴ天堂| 国产乱人伦偷精品视频免下载| 国产亚洲欧美激情| www.综合网.com| 亚洲不卡一区二区三区| 欧美sm美女调教| 成人蜜臀av电影| 亚洲国产一区二区三区青草影视 | 日本不卡一二三| 国产日产欧美一区二区视频| 一本一本久久a久久精品综合麻豆| 亚洲高清免费观看高清完整版在线观看| 欧美夫妻性生活| 懂色一区二区三区免费观看| 一区二区欧美国产| 精品国产精品一区二区夜夜嗨| 成人av高清在线| 六月丁香婷婷色狠狠久久| 国产午夜亚洲精品午夜鲁丝片| 欧美亚洲综合色| 国产高清精品久久久久| 亚洲va国产天堂va久久en| 欧美激情综合在线| 91精品国产麻豆国产自产在线 | 欧美在线视频日韩| 久久激情五月激情| 亚洲乱码日产精品bd| 日韩精品一区二区三区老鸭窝| 9色porny自拍视频一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎| 中文字幕中文在线不卡住| 欧美一级日韩免费不卡| 91香蕉国产在线观看软件| 久久不见久久见免费视频7| 亚洲综合在线免费观看| 91精品国产全国免费观看| 日本道色综合久久| 国产99一区视频免费| 麻豆成人在线观看| 亚洲国产成人高清精品| 国产精品久久久久影视| 久久综合狠狠综合久久激情| 欧美高清性hdvideosex| 欧美视频一区二区三区四区| 欧美日本乱大交xxxxx| 成人免费av在线| 国产东北露脸精品视频| 免费成人美女在线观看| 日韩国产欧美在线观看| 亚洲一区二区四区蜜桃| 亚洲精选视频免费看| 国产精品久久久久aaaa| 久久久精品综合| 精品入口麻豆88视频| 欧美一区二区三区在线| 欧美一级淫片007| 5月丁香婷婷综合| 在线不卡的av| 9191国产精品| 欧美一级欧美一级在线播放| 欧美日韩美少妇| 欧美日韩高清在线| 国产一区二区三区国产| 亚洲精品一二三四区| 日本丰满少妇一区二区三区| 99久久国产免费看| 99精品国产99久久久久久白柏 | 99久久99久久精品国产片果冻| 成人免费视频app| 成人一区二区三区视频在线观看| 国产精品中文有码| 国产激情一区二区三区桃花岛亚洲| 久久国产精品色婷婷| 国产在线不卡一区| 成人黄色在线网站| 一本高清dvd不卡在线观看| 91黄色免费网站| 91精品国产综合久久久久久久久久 | 国产不卡视频一区二区三区| 成人免费的视频| 欧美在线看片a免费观看| 在线播放中文一区| 久久久欧美精品sm网站| 国产精品久线观看视频| 亚洲综合免费观看高清完整版在线| 亚洲丰满少妇videoshd| 日本亚洲欧美天堂免费| 国产一区二区三区免费在线观看| 成人国产亚洲欧美成人综合网| 色一情一伦一子一伦一区| 日韩一区二区在线观看视频播放| 久久一夜天堂av一区二区三区| 中文字幕日韩精品一区| 天天免费综合色| 成人aaaa免费全部观看| 欧美日韩国产成人在线免费| 久久精品一区二区三区av| 亚洲图片欧美激情| 视频在线观看一区二区三区| 国产精品一区久久久久| 91久久国产最好的精华液| 精品国产乱码久久久久久图片| 欧美国产激情一区二区三区蜜月| 亚洲一区二区三区小说| 国产麻豆精品95视频| 欧洲一区二区av| 国产欧美一区二区精品久导航| 亚洲国产综合视频在线观看| 精品制服美女久久| 色悠久久久久综合欧美99| 欧美va亚洲va香蕉在线| 一区二区不卡在线播放 | 欧美日韩国产综合视频在线观看| 久久免费视频色| 亚洲国产精品久久人人爱蜜臀| 国产精品自在在线| 欧美日韩黄视频| 亚洲天堂av一区| 国产高清不卡二三区| 欧美大白屁股肥臀xxxxxx| 亚洲一区二三区| 99国产精品一区| 国产日韩欧美一区二区三区乱码 | 国产人伦精品一区二区| 青娱乐精品在线视频| 欧美亚州韩日在线看免费版国语版| 久久久五月婷婷| 久久99精品视频| 日韩一区二区三区在线观看| 亚洲一二三区不卡| 99久久国产综合精品麻豆| 欧美激情一二三区| 国产剧情一区二区三区| 日韩精品一区二| 麻豆91在线播放免费| 欧美一卡二卡三卡| 日韩精品色哟哟| 制服丝袜亚洲网站| 性久久久久久久久| 在线观看免费一区| 亚洲最新在线观看| 91久久精品一区二区| 亚洲国产精品久久久久秋霞影院| 一本大道av一区二区在线播放| 一区二区三区资源| 欧美系列亚洲系列| 日韩国产一区二|