Shappire GZip Utility用于在服務器上以gz格式或者多文件的zip格式來壓縮數據文件,當文件被下載至客戶端時,壓縮文件可以便捷的進行解壓。該產品它還可用于壓縮那些您并不常用的服務器上的數據文件,為服務器節省更多的內存用于日常運作。
Shappire GZip Utility allows you to compress data on the server in gz format or a multi-file zip file, this can be decompressed on the client device once it has been downloaded. Alternatively, it could be used to compress certain parts of your data on the device if it isn’t being used frequently, giving the device more memory to operate with.
隨著科學技術的發展,可以提供給計算機設備的內存與日俱增,同樣我們存儲的數據被同步增加。現在我們可以存儲絕大多數的產品和用戶信息,令計算機設備更好的進行日常運作。
然而,有時我們會發現我們的數據還是太大了,設想一下,通過GSM連接來傳遞一個產品目錄,這不僅僅需要一段很長的時間,而且還需花費許多連接費用。最好的解決辦法就是通過壓縮文件的格式進行數據傳輸,并在接收驅動設備上進行解壓。
產品特征:通過以下功能,Sapphire GZip Utility可以便捷的進行壓縮和解壓數據文件:
- 將文件壓縮為GZ格式
- 在接收驅動設備上解壓GZ文件
- 將多個文件壓縮為ZIP格式文件
- 在接收驅動設備上解壓ZIP文件
實例代碼 該操作是如此簡單的,您只需在您的程序中聲明相應的DLL函數,然后在您需要的地方調用即可。以下是一個VB.NET的實例程序,用于演示如何壓縮和解壓文件。
- 壓縮文件
Dim lError As Integer
lError = sZip(txtFile.Text, txtZip.Text, chkSubs.Checked, 1234567890)
If lError
MsgBox(lError)
Else
MsgBox("File(s) zipped")
End If - 解壓文件
Dim lError As Integer
lError = sUnzip(txtZip.Text, txtFile.Text, chkSubs.Checked, 1234567890)
If lError
MsgBox(lError)
Else
MsgBox("OK")
End If
The memory available on the devices is undoubtedly increasing as technology evolves, but so is the amount of data we are storing. We can now store more information about products and customers allowing a smoother daily run of the business.
However, we may sometimes find that our data is still, too big. Imagine transferring a product catalogue over a GSM connection which may not only take a long time, but be costly in connection charges. The solution is to be able to transfer the data in a compressed format and decompress it on the device.Product FeaturesThe Sapphire GZip Utility makes file compression and decompression simple with the following features:
- Compress a file into the GZ file format
- Decompress a GZ file onto the device
- Compress multiple files into the Zip file format
- Decompress a Zip file on to the device
Sample Code
Implementation couldn’t be easier, simply declare the DLL function as a function within your application and call it as though you wrote it yourself. Here’s a sample demo on how to compressing and decompress a file within VB.NET.
- Zipping a file
Dim lError As Integer
lError = sZip(txtFile.Text, txtZip.Text, chkSubs.Checked, 1234567890)
If lError <> 0 Then
MsgBox(lError)
Else
MsgBox("File(s) zipped")
End If
- Unzipping a file
Dim lError As Integer
lError = sUnzip(txtZip.Text, txtFile.Text, chkSubs.Checked, 1234567890)
If lError <> 0 Then
MsgBox(lError)
Else
MsgBox("OK")
End If