How to use the zlib.gunzipSync function in zlib

To help you get started, we’ve selected a few zlib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github s-panferov / awesome-typescript-loader / src / cache.ts View on Github external
function read(filename: string) {
	let content = fs.readFileSync(filename)
	let jsonString = zlib.gunzipSync(content)
	return JSON.parse(jsonString.toString())
}
github mkloubert / vscode-deploy-reloaded / src / resources / css.ts View on Github external
export function getContentSync(key: RepositoryKey): Buffer {
    let data: Buffer;

    for (const P in REPOSITORY) {
        if (P === key) {
            data = REPOSITORY[P];
            break;
        }
    }

    if (data) {
        return ZLib.gunzipSync(data);
    }

    return data;
}
github mkloubert / vscode-deploy-reloaded / src / resources / javascript.ts View on Github external
export function getContentSync(key: RepositoryKey): Buffer {
    let data: Buffer;

    for (const P in REPOSITORY) {
        if (P === key) {
            data = REPOSITORY[P];
            break;
        }
    }

    if (data) {
        return ZLib.gunzipSync(data);
    }

    return data;
}

zlib

Simple, synchronous deflate/inflate for buffers

Unrecognized
Latest version published 13 years ago

Package Health Score

56 / 100
Full package analysis