The XHTML WYSIWYG Editor For Desktop & Web Applications

GZip Component

Overview

Used to compress and decompress files using the GZip algorithm. When combined with TAR, it provides the UNIX equivalent to Zip archives commonly found on Windows computers. This component can be used in environments that support COM such as Active Server Pages, Windows Scripting Host, Visual Basic, etc.

License
Freeware
Type
ActiveX DLL for 32 bit OS
Version
2.1
File Name
XGZip.dll
Download Package
x-gzip.zip

Download

Download GZip Component

Installation Instructions

  1. Move the dll to a directory like: C:\Program Files\XStandard\Bin\.
  2. Open a command prompt and cd to the directory where the dll is located.
  3. Type regsvr32 XGZip.dll
  4. Grant "Read & Execute" file permissions on this dll to Everyone.

Note, on Microsoft Vista, the command prompt must be "Run as administrator" as shown in the screen shot below.

Context menu for the command prompt showing the option to run as administrator.

Uninstall Instructions

  1. Open a command prompt and cd to the directory where the dll is located.
  2. Type regsvr32 -u XGZip.dll

API Reference: ProgID: XStandard.TAR

Sub Compress(FileIn As String, FileOut As String)

Compresses a file.

Sub Decompress(FileIn As String, FolderOut As String)

Decompresses a compressed file. Output must be a path to a folder.

Property Version As String

(read-only)
Product version

Examples

The examples below are for Active Server Pages. For Windows Scripting Host or Visual Basic, replaceServer.CreateObject with CreateObject and replace Resonse.Write with MsgBox.

This example shows how to pack files using TAR GZip

  1. <%
  2. Dim objTAR, objGZip
  3. Set objTAR = Server.CreateObject("XStandard.TAR")
  4. Set objGZip = Server.CreateObject("XStandard.GZip")
  5. objTAR.Pack "C:\Temp\golf.jpg", "C:\Temp\images.tar"
  6. objTAR.Pack "C:\Temp\racing.gif", "C:\Temp\images.tar"
  7. objGZip.Compress "C:\Temp\images.tar", "C:\Temp\images.tar.gz"
  8. Set objTAR = Nothing
  9. Set objGZip = Nothing
  10. %>

This example shows how to pack and compress a folder using GZip

When a folder path is passed to the Compress method, it will TAR and compress the folder in a single step.

  1. <%
  2. Dim objGZip
  3. Set objGZip = Server.CreateObject("XStandard.GZip")
  4. objGZip.Compress "C:\Temp\Images", "C:\Temp\images.tar.gz"
  5. Set objGZip = Nothing
  6. %>

This example shows how to decompress and unpack files using GZip

If the file is a compressed tarball then the Decompress method will decompress and unpack the files into the given folder in a single step.

  1. <%
  2. Dim objGZip
  3. Set objGZip = Server.CreateObject("XStandard.GZip")
  4. objGZip.Decompress "C:\Temp\images.tar.gz", "C:\Temp"
  5. Set objGZip = Nothing
  6. %>