
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
fs-gzip-blob-storage
Advanced tools
Blob gzipped storage on filesystem with promises API.
This is a wrapper for
fs-blob-storage
This module requires ES6 with Node >= 6.
npm install fs-gzip-blob-storage
Additionally for Typescript:
npm install -D @types/node
const FsGzipBlobStorage = require('fs-gzip-blob-storage')
Typescript:
import FsGzipBlobStorage from 'fs-gzip-blob-storage'
const storage = new FsGzipBlobStorage(options)
Options:
defaultExt
is a default ext
argument for methods (optional, default: "")defaultPart
is a default part
argument for methods (optional, default:
".part")exclusive
if is true then can't create new object if already exists with
the same key (optional, default: false)gzipExt
is an extra extension for gzipped files (optional, default: ".gz")gzipOptions
is an object with options for gzip/gunzip (optional)path
is a directory path of the storage (optional, default: ".")Example:
const storage = new FsGzipBlobStorage({
path: '/usr/share/man',
exclusive: true
})
const writable = await storage.createWriteStream(key, options)
Options:
ext
is a default extension added to file name for the object (optional,
default: this.defaultExt
)part
is a extension added to file name which can be later commited
(optional, default: this.defaultPart
)Creates a writable stream for a new object in the storage. Object is gzipped and
stored with the file name based on key
and ext
and gzipExt
and part
.
Throws an error if has occurred and if the file already exists for exclusive
mode.
const readable = await storage.createWriteStream(key, options)
Options:
ext
is a default extension added to file name for the object (optional,
default: this.defaultExt
)Creates a readable stream for an existing, gunzipped object in the storage. Throws an error if has occurred or the object doesn't exist or its size is zero.
await storage.commit(key, options)
Options:
ext
is a default extension added to file name for the object (optional,
default: this.defaultExt
)part
is a extension added to file name which can be later commited
(optional, default: this.defaultPart
)Commits the object in the storage. It means that file name for the object is renamed and the additional extension for partial objects is removed. Throws an error if has occurred or the object doesn't exist.
await storage.remove(key, options)
Options:
ext
is a default extension added to file name for the object (optional,
default: this.defaultExt
)Removes the object from the storage. Throws an error if has occurred or the object doesn't exist.
Copyright (c) 2018 Piotr Roszatycki piotr.roszatycki@gmail.com
v0.4.0 2018-07-16
fs
with File System module.mock-fs
package anymore.FAQs
Blob storage on filesystem, with gzip, streams and promises API
The npm package fs-gzip-blob-storage receives a total of 34 weekly downloads. As such, fs-gzip-blob-storage popularity was classified as not popular.
We found that fs-gzip-blob-storage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.