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

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

?? comp_reducerdynamic.bas

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


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
'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 Sub Init_ReducerDynamic()
    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
End Sub

Public Sub Compress_ReducerDynamic(ByteArray() As Byte)
    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
    Call Init_ReducerDynamic
'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_ReducerDynamic(ByteArray() As Byte)
    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
    ReDim OutStream(500)
    Call Init_ReducerDynamic
    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 = ReadBitsFromArray(ByteArray, InposCont, InContBit, BitsForHeader) + 1
        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), BitsDeep - 1, BitsForHeader)
    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一区二区三区免费野_久草精品视频
日韩免费看的电影| 欧美日韩www| 国产精品水嫩水嫩| 成人午夜视频免费看| 亚洲国产高清不卡| 色就色 综合激情| 日本v片在线高清不卡在线观看| 欧美成人精品3d动漫h| 国产精品羞羞答答xxdd| 亚洲视频一区二区在线观看| 欧美日韩中文字幕一区| 免费在线一区观看| 国产亚洲一本大道中文在线| 91亚洲男人天堂| 日韩精品五月天| 欧美激情一区三区| 欧美亚洲精品一区| 国产一区二区三区日韩 | 国产一区二区三区免费在线观看| 久久久精品人体av艺术| 在线视频中文字幕一区二区| 麻豆中文一区二区| 中文字幕一区av| 欧美一区二区三区视频在线| 成人小视频免费在线观看| 亚洲一区二区三区中文字幕在线| 欧美大白屁股肥臀xxxxxx| 99re热视频这里只精品| 麻豆精品在线播放| 亚洲乱码中文字幕| 精品国产精品网麻豆系列| 91久久国产综合久久| 国产一区二三区好的| 亚洲一区二区三区美女| 国产日韩欧美电影| 欧美精选一区二区| av电影一区二区| 久久精品国产久精国产| 一区二区三区视频在线看| 久久伊人蜜桃av一区二区| 欧美性videosxxxxx| 粉嫩13p一区二区三区| 免费的成人av| 亚洲午夜在线观看视频在线| 中文字幕日韩精品一区 | 国产日产欧美一区二区视频| 欧美日韩久久不卡| 91浏览器打开| 成人免费va视频| 国产高清无密码一区二区三区| 日韩在线播放一区二区| 亚洲裸体在线观看| 国产精品进线69影院| 久久久久久久久久久久电影| 在线不卡免费av| 欧美日韩一级片网站| 99国产麻豆精品| 粉嫩一区二区三区在线看| 久久99国产精品久久99果冻传媒| 亚洲国产一区二区视频| 亚洲视频一区二区在线| 成人免费在线播放视频| 国产亚洲制服色| 久久久久国产免费免费| 精品久久久久99| 欧美变态tickling挠脚心| 91精品国产入口| 3d成人h动漫网站入口| 在线精品视频一区二区| 欧美性感一类影片在线播放| 欧美在线小视频| 欧美日韩在线播放三区四区| 91久久线看在观草草青青| 一本在线高清不卡dvd| 99久久婷婷国产综合精品| 91亚洲国产成人精品一区二三| 99精品视频中文字幕| eeuss鲁片一区二区三区在线看| 丁香五精品蜜臀久久久久99网站 | www国产亚洲精品久久麻豆| 日韩午夜三级在线| 精品国产凹凸成av人导航| 久久精品免费在线观看| 中文字幕av资源一区| 亚洲人成影院在线观看| 一级女性全黄久久生活片免费| 夜夜嗨av一区二区三区网页 | 色婷婷综合久久久中文一区二区| 一本一本大道香蕉久在线精品| 欧美在线观看视频在线| 欧美一区二区三区视频在线观看 | 3atv一区二区三区| 精品国产一区二区精华| 欧美草草影院在线视频| 国产亚洲成年网址在线观看| 久久伊99综合婷婷久久伊| 国产精品视频一二三区| 亚洲精品国产第一综合99久久 | 国产一区二三区好的| 高清国产一区二区| 91猫先生在线| 在线不卡中文字幕| 国产性天天综合网| 亚洲最大色网站| 精一区二区三区| 91无套直看片红桃| 91精品国产福利在线观看| 2017欧美狠狠色| 亚洲欧美电影一区二区| 免费高清在线视频一区·| 成a人片亚洲日本久久| 欧美三级蜜桃2在线观看| 日韩视频在线一区二区| 亚洲色欲色欲www| 美女爽到高潮91| 一本一道波多野结衣一区二区| 日韩美女一区二区三区四区| 亚洲免费av高清| 精品一区二区三区在线播放| 色八戒一区二区三区| 欧美精品一区男女天堂| 一区二区三区不卡视频| 国产成人免费视频网站| 欧美一区二区在线视频| 亚洲图片另类小说| 国内外成人在线| 欧美日韩一区二区三区免费看| 精品国产一区二区三区不卡| 亚洲高清中文字幕| 99久久精品免费看| 欧美精品一区二区三区蜜桃 | 国产精品区一区二区三| 日本不卡免费在线视频| 色噜噜狠狠成人中文综合| 欧美精品一区二区精品网| 日韩主播视频在线| 色丁香久综合在线久综合在线观看| 久久久久久久综合| 美女网站色91| 欧美高清www午色夜在线视频| 亚洲欧美成人一区二区三区| 国产99一区视频免费| 亚洲精品在线网站| 久久精品国产一区二区三| 678五月天丁香亚洲综合网| 亚洲免费观看高清完整| heyzo一本久久综合| 国产片一区二区| 国产福利一区二区三区视频在线 | 视频一区免费在线观看| 在线亚洲高清视频| 亚洲精品一卡二卡| 91麻豆成人久久精品二区三区| 国产女同性恋一区二区| 国产成人av电影免费在线观看| 精品福利视频一区二区三区| 日本v片在线高清不卡在线观看| 欧美日韩高清影院| 天堂资源在线中文精品| 在线观看欧美黄色| 亚洲最新视频在线播放| 在线观看av一区| 午夜久久福利影院| 欧美精品一卡两卡| 亚洲电影一区二区三区| 欧美亚洲动漫另类| 日本在线播放一区二区三区| 欧美一区二区网站| 久久精品噜噜噜成人av农村| 精品国一区二区三区| 国产河南妇女毛片精品久久久 | 粉嫩av一区二区三区| 欧美国产日韩在线观看| 99久久99久久久精品齐齐| 综合中文字幕亚洲| 色94色欧美sute亚洲线路二| 亚洲成av人片观看| 欧美一区二区黄| 国产麻豆欧美日韩一区| 日本一二三不卡| 色婷婷综合久久| 午夜精品久久久久久不卡8050| 欧美一区二区三区在线观看| 久久99九九99精品| 国产欧美日产一区| 在线观看日韩电影| 久久精品国产色蜜蜜麻豆| 国产欧美精品一区二区色综合朱莉 | 亚洲一二三四区不卡| 91精品国产91久久久久久一区二区 | 日韩一区二区免费在线观看| 国产尤物一区二区| 1024精品合集| 91精品国产综合久久久久久久久久| 美女视频第一区二区三区免费观看网站 | 婷婷成人激情在线网| 精品国产免费一区二区三区香蕉| www..com久久爱| 日韩av中文字幕一区二区三区| 久久美女艺术照精彩视频福利播放 |