sc-compression
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,1 +0,1 @@ | ||
module.exports = require('./sc-compression'); | ||
module.exports = require('./src/sc-compression'); |
{ | ||
"name": "sc-compression", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"fs-extra": "^8.1.0", | ||
"lzma-native": "^5.0.0", | ||
"lzma-native": "^5.0.1", | ||
"md5": "^2.2.1", | ||
@@ -16,0 +16,0 @@ "sync-rpc": "^1.3.6" |
@@ -22,9 +22,18 @@ # sc-compression | ||
const { readdirSync, readFileSync, writeFileSync } = require('fs'); | ||
const { resolve } = require('path'); | ||
const ScCompression = require('sc-compression'); | ||
readdirSync('coc-13.0.4/logic/').forEach((file) => { | ||
const buffer = readFileSync(file); | ||
writeFileSync(file, ScCompression.decompress(buffer)); | ||
const directory = 'coc-13.0.4/logic'; | ||
readdirSync(directory).forEach((file) => { | ||
const filepath = resolve(directory, file); | ||
const buffer = readFileSync(filepath); | ||
writeFileSync(filepath, ScCompression.decompress(buffer)); | ||
}); | ||
``` | ||
See tests for additional examples. | ||
See tests for additional implementation examples. | ||
## Step by step guide for non-developers | ||
- Make sure you have Node.js installed (https://nodejs.org/en/) | ||
- Run ``npm install -g sc-compression`` in a terminal | ||
- Download examples/decompress.js from this repository | ||
- Run ``node decompress.js`` in a terminal | ||
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1602067
14
6403
39
2
1
Updatedlzma-native@^5.0.1