Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
sc-compression
Advanced tools
This module is intended to compress and decompress Supercell assets.
It supports the following signatures:
signature | description |
---|---|
'none' | non-compressed file |
'lzma' | starts with bytes 0x5d0000 |
'sc' | starts with "SC" |
'sc2' | starts with "SC" and contains "START" |
'sclz' | starts with "SC" and contains "SCLZ" |
'sig' | starts with "Sig:" |
The module automatically infers the right signature when decompress
is called.
npm install sc-compression
decompress(buffer)
Decompress a file buffer.
buffer
<Buffer> A compressed file that was read into a Node.js Buffercompress(buffer, signature)
Compress a file buffer.
buffer
<Buffer> A file that was read into a Node.js Buffersignature
<string> 'lzma'
, 'sc'
, 'sclz'
or 'sig'
. It is impossible to recompress an sig
file with a valid hash, so attempting to load an sig
file in an unpatched game client will crash.readSignature(buffer)
Read a compressed file signature.
buffer
<Buffer> A compressed file that was read into a Node.js Bufferimport { readdirSync, readFileSync, writeFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { decompress } from 'sc-compression';
const directory = 'coc-13.0.4/logic';
readdirSync(directory).forEach((file) => {
const filepath = resolve(directory, file);
const buffer = readFileSync(filepath);
writeFileSync(filepath, decompress(buffer));
});
See tests for additional implementation examples.
npm install -g sc-compression
in a terminalnode decompress.mjs
in a terminalFAQs
Compress and decompress Supercell games assets
The npm package sc-compression receives a total of 8 weekly downloads. As such, sc-compression popularity was classified as not popular.
We found that sc-compression demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.