Visual Basic 6.0
Visual Basic 6.0
bz2 Compress File
Compress a file to the bz2 file format.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim bz2 As New ChilkatBz2
' Compress the file qa_data/hamlet.xml to create qa_output/hamlet.bz2
success = bz2.CompressFile("qa_data/hamlet.xml","qa_output/hamlet.bz2")
If (success <> 1) Then
Debug.Print bz2.LastErrorText
Exit Sub
End If
Debug.Print "Success."