mIRC Home    About    Download    Register    News    Help

Print Thread
#94808 20/08/04 03:17 AM
Joined: Dec 2002
Posts: 24
L
Laban Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 24
Found a little annoying bug there in the helpfile when reading about $compress and $decompress.

QUOTE
$compress(file|&bvar, blN)
$decompress(file|&bvar)
Compresses the specified file or binary variable. The result is raw compressed data.

Where b indicates a binary variable in the first parameter, and lN sets a compression level of 1 to 6 (default is 6). Returns 1 for sucess, 0 for failure.
END QUOTE

It does not say that $decompress need a second parameter, which it does.


!ERAU QSSI DLRO WEHT
#94809 20/08/04 10:25 AM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
$decompress doesnt require any additional parameters.

$compress(file.txt)
$decompress(file.txt)

Work wonderfully here.

Eamonn.

#94810 20/08/04 02:09 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$decompress can take a second parameter though.

The format is really:
$compress(file|&bvar, blN)
$decompress(file|&bvar, b)


with second parameters being optional in both cases.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#94811 20/08/04 02:23 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
It can yes, but it does nothing, since $decompress automatically "assesses" (sp), the degree of compression ($compress(file,n)) and decompresses.

As if it didnt then you should be able to do,

$compress(file,2)
$decompress(file,1)

And it still be compressed to 1 degree, but it isnt, its decompressed.

Eamonn.

#94812 20/08/04 02:43 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Yes the level makes no difference, I didn't include that in the listing. The b parameter is still necessary to decompress binary variables.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard