save file experimentation

This commit is contained in:
Rph :3 2024-05-09 20:07:01 +02:00
parent 87ee2ca2fa
commit fdbeeb8677
6 changed files with 27100 additions and 0 deletions

1
save-patcher/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

27069
save-patcher/file1.json Normal file

File diff suppressed because it is too large Load Diff

20
save-patcher/package-lock.json generated Normal file
View File

@ -0,0 +1,20 @@
{
"name": "save-patcher",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"lz-string": "^1.5.0"
}
},
"node_modules/lz-string": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
"bin": {
"lz-string": "bin/bin.js"
}
}
}
}

View File

@ -0,0 +1,5 @@
{
"dependencies": {
"lz-string": "^1.5.0"
}
}

View File

@ -0,0 +1,5 @@
const lzs = require('lz-string');
const fs = require('fs');
const decoded = JSON.parse(lzs.decompressFromBase64(fs.readFileSync(process.argv[2], "utf-8")));
fs.writeFileSync(process.argv[3], JSON.stringify(decoded, null, 2));