static cache should be prefixed by network
Signed-off-by: AlienTornadosaurusHex <>
This commit is contained in:
parent
e49e3e0c0d
commit
ad0d1391dc
120 changed files with 81 additions and 43 deletions
|
@ -1,14 +1,11 @@
|
|||
import fs from 'fs'
|
||||
import zlib from 'zlib'
|
||||
|
||||
export async function save(filePath) {
|
||||
const directories = filePath.split('/')
|
||||
const fileName = directories[directories.length - 1]
|
||||
|
||||
export function save(filePath) {
|
||||
try {
|
||||
const data = fs.readFileSync(`${filePath}`)
|
||||
|
||||
const payload = await zlib.deflateSync(data, {
|
||||
const payload = zlib.deflateSync(data, {
|
||||
level: zlib.constants.Z_BEST_COMPRESSION,
|
||||
strategy: zlib.constants.Z_FILTERED
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue