sc-compression
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "sc-compression", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Compress and decompress Supercell games assets", | ||
@@ -5,0 +5,0 @@ "type": "module", |
# Sc Compression | ||
This module is intended to compress and decompress Supercell assets. | ||
It supports the following signatures: | ||
- `'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:" | ||
| 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. | ||
@@ -18,3 +21,3 @@ ## Install | ||
- `buffer` <Buffer\> A compressed file that was read into a Node.js Buffer | ||
- Returns: <Buffer\> A decompressed file buffer that can be written to disk | ||
- Returns: <Promise<Buffer\>\> A decompressed file buffer that can be written to disk | ||
@@ -25,3 +28,3 @@ ### `compress(buffer, signature)` | ||
- `signature` <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. | ||
- Returns: <Buffer\> A compressed file buffer that can be written to disk | ||
- Returns: <Promise<Buffer\>\> A compressed file buffer that can be written to disk | ||
@@ -28,0 +31,0 @@ ### `readSignature(buffer)` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1591778
55
0