Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 15-07-2018, 01:00
TheGeekyGamer's Avatar
TheGeekyGamer TheGeekyGamer is offline
Registered User
Join Date: Jun 2018
Location: File Forums
Posts: 18
Thanks: 38
Thanked 5 Times in 5 Posts
TheGeekyGamer is on a distinguished road
Question HELP: Compiling CLS libraries using GCC/MSVC

Hi, everyone

There is an add-on in FreeArc to compile cls libraries

How do i add compression algorithm to the simple_codec.cpp file ?

I am new to C/C++ programming. Anyone with knowledge of C, please help me out..

#include "cls.h"

int ClsMain (int op, CLS_CALLBACK callback, void* instance)
    case CLS_COMPRESS:
            char param[100];
            callback(instance, CLS_GET_PARAMSTR, param, 100);  // Get method parameters as single string

            const int BUFSIZE = 4096;
            char buf[BUFSIZE];
            for (int len; (len=callback(instance, CLS_PARTIAL_READ, buf, BUFSIZE)) != 0; )
                if (len<0)  return len;  // Return errcode on error
                int result = callback(instance, CLS_FULL_WRITE, buf, len);
                if (result != len)  return result<0? result : CLS_ERROR_WRITE;
            return CLS_OK;

Reply With Quote
Sponsored Links

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inno Setup: Additional Libraries altef_4 Conversion Tutorials 50 21-10-2020 09:59
ISComponent libraries Jiva newstone Conversion Tutorials 16 13-06-2018 05:00
Compiling patches to CD rambai PC Games 3 17-05-2009 13:05
Compiling jmaverick101 PC Games 1 04-04-2004 17:34
Problem with compiling seperate files.. esong2k3 DC Games 1 01-07-2003 08:34

All times are GMT -7. The time now is 06:19.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com