Dim str As String Dim packed_bytes As Variant Dim unpacked_bytes As Variant str = "随便测试一个相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长的字符串" '压缩 packed_bytes = StrConv(str, vbFromUnicode) MsgBox "压缩前
为方便VB应用的开发,特开发此组件.可以支持几乎所有VB当中的原生类型的压缩(需要通过Variant). 简单实例: Dim str As String Dim packed_bytes As Variant Dim unpacked_bytes As Variant str = "随便测试一个相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长相当长的字符串"