For compression, create input and output files, write 8 empty bytes in output, use CM::Compress using input size and compress input, after compression finishes seek back to start, write output size - 8 in first 8 bytes.
In decompression, create stdin and stdout, read 8 bytes to get output size, CM:

ecompress with size to decompress into stdout and you're done.
No need of CLS, MCM code w/o it's detection and stuff is compatible with stdio.