
// Open the binary file to zip.
edtFilename = Form.ShowFileOpenDialog()
// Load binary to a BLOB variable.
varBlob = File.LoadBinary(edtFilename)
// Compress varBlob and save result to varBlobZip.
varBlobZip = Zip.ZipBinary(varBlob)
// Save compressed binary stream to a file.
File.SaveBinary("c:\zipbin.bmp", varBlobZip)
Notes:
Use Form.ShowFileOpenDialog method to open a binary file.
Use File.LoadBinary method to load the binary file to a base64binary variable.
You can save it with any file extension as long as that file will be uncompressed with the UnzipBinary method.
// Open the zipped binary file to uncompress.
edtFileZip = Form.ShowFileOpenDialog()
// Load zipped binary to a BLOB variable.
varBlobZip = File.LoadBinary(edtFileZip)
// Uncompress varBlobZip and save to a base64binary variable.
varBlob = Zip.UnzipBinary(varBlobZip)
// Save to a file.
File.SaveBinary("c:\unzipbin.bmp", varBlob)
// Load varBlob to scribble.
scribble1.LoadBitmapBinary(varBlob)
Notes:
Use Form.ShowFileOpenDialog method to open a binary file.
Use File.LoadBinary method to load the binary file to a base64binary variable.
Save the binary if required with SaveBinary method or you can display the uncompressed binary to a scribble control.