View Single Post
Old 15-07-2018, 08:16
Gupta Gupta is offline
Registered User
Join Date: Aug 2016
Location: India
Posts: 397
Thanks: 139
Thanked 708 Times in 229 Posts
Gupta is on a distinguished road
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
class ClsLzhamCompressor : public ClsCompressor {
  template <typename... Types>
  ClsLzhamCompressor(Types... Args) : ClsCompressor{Args...} {}

// 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:
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)