• λ我爱Aspx >> Asp.Net >> Huffman with Short dictionary压缩算法(VB.NET Source)
  • Huffman with Short dictionary压缩算法(VB.NET Source)

  • :aspxer  Դ:internet  :2007-5-31 2:20:11  ؼ:.net
  • For X = 0 To 7

    BitValue(X) = 2 ^ X

    Next

    Call AddASC2Array(OutStream, OutPutSize, "HE4")

    Call AddASC2Array(OutStream, OutPutSize, DictString)

    Call AddASC2Array(OutStream, OutPutSize, Chr(CheckSum))

    Call AddASC2Array(OutStream, OutPutSize, CStr(UBound(FileArray) + 1) & vbCr)

    TelBits = 7

    ByteValue = 0

    For X = 0 To UBound(FileArray)

    For Y = CharVal(FileArray(X)) - 1 To 0 Step -1 @#bitlengte

    If (BitVal(FileArray(X)) And 2 ^ Y) > 0 Then

    ByteValue = ByteValue + BitValue(TelBits)

    End If

    TelBits = TelBits - 1

    If TelBits = -1 Then

    OutPutSize = OutPutSize + 1

    OutStream(OutPutSize) = ByteValue

    TelBits = 7

    ByteValue = 0

    End If

    Next

    Next

    If TelBits <> 7 Then

    OutPutSize = OutPutSize + 1

    Ҷƪл˵?
  • һƪ上面提到的原代码(C语言)—1
    һƪ给贝贝的,Base64编码(带有Q和B编码)——VB.NET