
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
multiblob
Advanced tools
A content-addressable-store that supports multiple hashing algorithms, and pull-streams.
var Blobs = require('multiblob')
var blobs = Blobs({ dir: '/media/blobCollection' })
pull(
source, // a buffer stream e.g. from pull-file
blobs.add(function (err, hash) {
console.log('added source to blobs:', hash)
})
)
where config is an Object with properties:
dir String - the directory to store blobs inalg String (optional) - the algorithm for hashing. Valid options: 'blake2s', 'sha256' (default: 'blake2s')encode Function (optional) - converts a buffer to a string (default: see util.js#encode)decode Function (optional) - recovers a string into an object { hash: Buffer, alg } (default: see util.js#decode)isHash Function (optional) - tests a string to check if it's a valid hash (default: see util.js#isHash)Create a sink stream for writing a blob. Expects to receive a buffer stream.
If hash was given, then it will error if the file turned out to be different.
If a cb is not given and there was an error, this function will throw.
Takes the hash of blob already in the store and return a source buffer stream. If the file does not exist this stream will error.
If the argument is a hash string, then return the stream.
If the argument is an opts object, with the key: hash property,
retrive that blob, but error if the size does not exactly match the
size property, or is over max property (in bytes)
create a source stream that reads a slice of a given blob,
from the start property to the end property, in bytes.
Error if the file does not exist or if
the size of the whole blob does not exactly match the
size property, or is over max property (in bytes).
check if the given hash is in the store.
If hash is an array of hashes,
size will callback with an array of booleans.
get the size of this blob. If hash is an array of hashes,
size will callback with an array of sizes.
If the hash does not exist in the store, size will callback null.
source stream that reads the list of hashes available in the store.
remove a hash from the store.
Check if a given hash is actually the empty hash. If something has the empty hash, that is probably a bug. The above methods will act like the empty file is already in the store.
???
???
maybe emit events when blobs are stored?
MIT
FAQs
A content-addressable store supporting multiple hash algorithms
The npm package multiblob receives a total of 292 weekly downloads. As such, multiblob popularity was classified as not popular.
We found that multiblob demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.