Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fs.open("test/hamlet.txt.xz", "r", (err: any, fd: number) => {
if (err) return;
// handle error
lzma.parseFileIndexFD(fd, (err, info) => {
// handle error
if (err) {
console.log(err);
}
// do something with e.g. info.uncompressedSize
fs.close(fd, (err: any) => {
/* handle error */
if (err) {
console.log(err);
}
});
});
});