1
votes

I'm tring to implement LZW compression inside a classic asp script. this is the LZW VBscript: http://www.koders.com/asp/fid8C7ADB343C2D52BEC62BEFFCD05C2C3207C263AD.aspx?s=lzw#L3

However, I get into problems (including vb inside classic asp):

Microsoft VBScript compilation error '800a03ee' Expected ')' /_test/lzw_class.asp, line 109 Public Sub Compress_LZW_Static_Hash(aFileArray() As Byte) -------------------------------------------------^

Is there a simple way to include vbscript inside asp?

2
Btw: if you have a classic asp LZW implementation function to compress strings, it will be a wonderful bonus :-) - Alon

2 Answers

3
votes

To "VBScriptify" that code someone has gone through it and made all the variables typeless variants by commenting out their type names, but they forgot to do so on line 109 (and a lot of other places too);

Edit; That class uses the CopyMem API so you can't port it to VBS. You will need to find an existing component that does compression or compile that class to a COM dll with VB6.

0
votes

For ZIP compression of files using ASP I use a DLL. Then whenever I need to use it I simply call it. In the old days we had to write our own DLL but today it sometimes fails. I have since found a free resource known as Xzip that has excellent performance enabbling me to create a file, save the file, ZIP it and send by email or provide a zipped download... on the fly using Classic ASP.

For the ZIP part see http://www.xstandard.com/en/documentation/xzip/