基于Zlib的压缩/解压缩组件

时间:2011-11-11 12:42:33
【文件属性】:

文件名称:基于Zlib的压缩/解压缩组件

文件大小:87KB

文件格式:ZIP

更新时间:2011-11-11 12:42:33

VB,zlib,压缩

Dim str As String Dim packed_bytes As Variant Dim unpacked_bytes As Variant str = "随便测试一个相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长的字符串" '压缩 packed_bytes = StrConv(str, vbFromUnicode) MsgBox "压缩前字节数:" & LenB(packed_bytes) Call PackStream(packed_bytes) MsgBox "压缩后字节数:" & (UBound(packed_bytes) - LBound(packed_bytes) + 1) '解压缩 unpacked_bytes = packed_bytes MsgBox "解压缩前字节数:" & (UBound(unpacked_bytes) - LBound(unpacked_bytes) + 1) Call UnPackStream(unpacked_bytes) MsgBox "解压缩后字节数:" & LenB(unpacked_bytes) str = StrConv(unpacked_bytes, vbUnicode) MsgBox str


【文件预览】:
mdlFilePacketC.bas
FPacketC.dll

网友评论

  • vb的,有乱码,下这个不如下这个http://download.csdn.net/detail/unsigned/713355 ,它是这个的超集