Shappire GZip Utility用于在服務(wù)器上以gz格式或者多文件的zip格式來壓縮數(shù)據(jù)文件,當(dāng)文件被下載至客戶端時,壓縮文件可以便捷的進(jìn)行解壓。該產(chǎn)品它還可用于壓縮那些您并不常用的服務(wù)器上的數(shù)據(jù)文件,為服務(wù)器節(jié)省更多的內(nèi)存用于日常運(yùn)作。
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.
隨著科學(xué)技術(shù)的發(fā)展,可以提供給計算機(jī)設(shè)備的內(nèi)存與日俱增,同樣我們存儲的數(shù)據(jù)被同步增加。現(xiàn)在我們可以存儲絕大多數(shù)的產(chǎn)品和用戶信息,令計算機(jī)設(shè)備更好的進(jìn)行日常運(yùn)作。
然而,有時我們會發(fā)現(xiàn)我們的數(shù)據(jù)還是太大了,設(shè)想一下,通過GSM連接來傳遞一個產(chǎn)品目錄,這不僅僅需要一段很長的時間,而且還需花費(fèi)許多連接費(fèi)用。最好的解決辦法就是通過壓縮文件的格式進(jìn)行數(shù)據(jù)傳輸,并在接收驅(qū)動設(shè)備上進(jìn)行解壓。
產(chǎn)品特征:通過以下功能,Sapphire GZip Utility可以便捷的進(jìn)行壓縮和解壓數(shù)據(jù)文件:
- 將文件壓縮為GZ格式
- 在接收驅(qū)動設(shè)備上解壓GZ文件
- 將多個文件壓縮為ZIP格式文件
- 在接收驅(qū)動設(shè)備上解壓ZIP文件
實(shí)例代碼 該操作是如此簡單的,您只需在您的程序中聲明相應(yīng)的DLL函數(shù),然后在您需要的地方調(diào)用即可。以下是一個VB.NET的實(shí)例程序,用于演示如何壓縮和解壓文件。
- 壓縮文件
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