does the lN parameter for $decompress do anything? Try this
/write some.txt blah blah blah
//echo -a $compress(some.txt,l1)
Now view the file (it's compressed)
//echo -a $decompress(some.txt,l6)
Now view the file (it's decompressed)
//echo -a $compress(some.txt,l6)
Now view the file (it's compressed)
//echo -a $decompress(some.txt,l1)
Now view the file (it's decompressed)
It seems, regardless of what value I specify for lN in $decompress, it is able to decompress the data. So if this option does nothing, why does it exist? Assuming mIRC is using zlib, you don't specify a compression level to decompress, that information is stored in the actual compressed data.
Also, whatever algorithm mIRC uses, it isn't very good. A good compression algorithm has the "never grows" option. For example, if I want to compress a file that contains just the letter "a" (which obviously can't get any smaller), no real compression is done, because that would actually cause the file to get larger. mIRC doesn't do this, it will let the file get bigger and bigger. For example, do (using the same file above)
//echo -a $compress(some.txt,l6)
Do that 5 times, and after each time look at the file, notice how each time the file gets bigger and bigger; a good compression algorithm would not let that happen.
Lastly, I know I should probably post this on the feature suggestion forum, but it seems stupid to create another post. I suggest an expansion for $compress/$decompress:
$compress(file|&binvar,file|&binvar,lNb)
$decompress(file|&binvar, file|&binvar,b)
The reason is, most of the time, when you are doing a file compression, you don't want to actually overwrite the file. Like if I use a file zipper on some.txt, it creates some.zip, it doesn't overwrite some.txt with compressed data. Same for decompression, if I decompress some.zip, it doesn't overwrite some.zip with the txt info, it creates some.txt. It would seem to be that it would be useful if $compress/$decompress supported this directly rather than having to, for example, load the file into a binvar, $compress the binvar, then /bwrite it to another file.