View Single Post
  #10  
Old 15-07-2018, 08:16
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 715 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
just use cmake(check attached archive), i used it with msys2 and msvc
PS: for using the boost in msvc, I have handwritten the paths in CMakeList.txt, you probably have to change it according to your environment, it works just fine with msys2(use pacman)
also remember the arc is 32 bit so you have to use 32 bit environment for both msvc and msys2

in C++ you just need to inherit from ClsCompressor class and overwrite compress and decompress function
f.e:
Code:
class ClsLzhamCompressor : public ClsCompressor {
public:
  template <typename... Types>
  ClsLzhamCompressor(Types... Args) : ClsCompressor{Args...} {}

protected:
// overwrite this method for your compression 
// see ClsCompressor defination in cls.h and use read_exactly(...) and equivalent functions for required operation
  void decompress() override;

};
your main will look like:
Code:
extern "C" int __cdecl ClsMain(int operation, CLS_CALLBACK callback,
                               void *instance) {
  return ClsLzhamCompressor(operation, callback, instance).run();
}
Attached Files
File Type: 7z _CLS.7z (6.7 KB, 15 views)

Last edited by Gupta; 15-07-2018 at 10:21.
Reply With Quote
The Following 2 Users Say Thank You to Gupta For This Useful Post:
Simorq (17-08-2018), TheGeekyGamer (15-07-2018)