Compressing and decompressing game assets (.csv, .sc, etc.)

Supercell game assets implement different compression algorithms and signatures:

Code Signature Comment
0 NONE Regular non-compressed file
1 LZMA Starts with 5d 00 00
2 SC Starts with SC
3 SCLZ Starts with SC and contains SCLZ
4 SIG Starts with Sig:

The following Node.js module will help you to compress and decompress them:

1 Like

Hello, I’m here to ask for a bit of clarification on the Node.js module to compress the clash files.
I’m a newbie and i just discovered your website but i was interested in decompressing some files (csv mainly). I was wondering if is there any kind of tutorial (written, video or anything) that could guide me and help me in the process of compressing and decompressing the game files using the Node module. I have node installed on my pc but i have no idea how i need to use it with the module i see on github. Any help or tutorial would be awesome.

Hi,
I’ve just updated the repository with a step by step guide for non-developers.
Can you have a look and let me know if you are able to manage decompression?

Thanks for the update. So, i managed to install sc-compression and i downloaded decompress.js too but whenever i run node decompress.js i get an error, it’s unable to find the module. Also, where can I specify what’s the file or the folder of files that i want to compress/decompress. Thanks so much for your help

Can you show me the exact error ?
Did you install with npm install -g sc-compression? -g option is important for this script.
You will be prompted to choose for a file or directory when running the script.

Alright, i tried on another pc and it worked perfectly, thanks so much for your help.
Also, which one should i use to compress a file that i previously decompressed?

1 Like

Is there any way to compress the files back or this can only be used to decompress them?

The module can be used to compress as well. I haven’t provided the script for non-developers yet cause I didn’t have time to work on it so far.

Alright, thanks. By same module you mean the decompress.js or a different one?

I meant the Node.js sc-compression module. decompress.js is more like a script using the module.

yes, but anyone knows how encrypt file back?

From Here I Was Able To Get The Code To Decompress Clash Of Clans File. But I Didn’t Found A Way To Compress Them Back. After Some Coding I Was Able To Compress Them Back.

Now The Problem Is That The original file Starts With:

But After Decompressing, Editing And Compressing Again It Stars With:

Is There Any Fix @Ultrapowa

Also Do You Guys Want The Compressing Code. If You Want It Answer the Poll Below. Poll Will End After 10 Days. I Will Give The Code Depending On The Poll Answer.

  • Yes
  • No
  • Not Interested

0 voters

@Ultrapowa there was a problem. When i compressed .csv file and put it on /update/logic/ folder, game crashed. Same happened when i put compressed csv file onto .apk file. What did i do wrong? Also, this is possible compress error, but .csv can be decompressed and compressed again

Link to file: https://drive.google.com/file/d/1qa1n0lyd5bnU7F06dln2EZruGCwKYt8S/view?usp=sharing

Latest SC game clients check for .Sig file signature. My module supports compressing multiple old format, but doesn’t support .Sig compression yet (https://github.com/jeanbmar/sc-compression/issues/1). I need to spend some time on reversing it to enable the format.

have you created a software for encrypt files back?