View Single Post
  #289  
Old 08-03-2026, 15:24
USSRCoder USSRCoder is offline
Registered User
 
Join Date: Feb 2026
Location: Lviv
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
USSRCoder is on a distinguished road
Quote:
Originally Posted by kj911 View Post
Could someone write a good guide on how to make a CLS filter for FreeArc??

No, I don't mean the "CLS-Generator" solutions, unfortunately they don't work in all many cases.

Now, let's assume we have this:

compressor.c /source code or alternative EXE file/
CLS source code package from FreeArc. + MinGW compiler.

What do we need to modify in the *.c source code during compilation so that, upon receiving a "cls-cmp.dll" file at the end of the process, it works as a DLL with FreeArc, either as an decompressor only or with full functionality, when using the "-mcmp..." switch during compression.

To make things more complicated, let's assume that this is just the syntax (*.c or EXE):

compressor.exe e/d in out

What should we write in "cls.h" or other "simple*.cpp" files?

One possible case is that we will only have a *.dll file, nothing else is needed, it can be used already.

While the other, if only an EXE file is available, how do we "bind" the cls-*.dll file to our file so that the given compressor can work in STDIO mode? (no tmp files are written during operations.) Or do we need to modify the EXE as well? (see: the Razor case.)
cls - It's poorly documented, so I went a different route. You'll still have to run a precompressor. So I took the existing source code (Precomp v0.4.7 https://github.com/schnaader/precomp-cpp/) and added my own formats. I'd also be interested in learning about cls filters, but I was able to do it faster using Precomp v0.4.7. If you're working in Pascal, you can do the same with xtool.

The console is probably (!) needed for 32/64 compatibility, no more. You can't it do without temporary files if you're compressing 20GB and you only have 8GB.
(I'm looking at it from the perspective of solid archives. If you're streaming data, the console will help you get rid of temporary files.)

Last edited by USSRCoder; 08-03-2026 at 19:43.
Reply With Quote