
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Compression and decompression of data described by JSON Schema.
npm install minibit
MiniBit allows you to reuse validation JSON Schema to compress data to a smaller size than JSON serialization.
Typically, you can compress data to as little as 30% the size of arbitrary serialization such as JSON stringification and message pack.
This is achieved by:
Note:
import { encode, decode } from 'minibit';
const data = {
// data
};
const schema = {
// JSON Schema
};
const buffer = encode(data, schema)
const dataB = decode(buffer, schema)
buffer = encode(data, schema)Encodes data to buffer.
data = decode(buffer, schema)Decodes data from buffer.
The following changes in schema break backwards compatibility for encoded data:
It is recommended to make the root schema an object, only add new properties and mark old properties as deprecated.
MiniBit does not validate data and treats object properties as optional. Decoding will not fail if a deprecated properties is not present.
Benchmarks use a sample object that include all JSON schema types. The code for it can be found here.
| Serializer | Size |
|---|---|
| minibit | 90 bytes |
| msgpack | 232 bytes |
| JSON | 306 bytes |
MIT
FAQs
Fast and efficient binary serialization.
We found that minibit demonstrated a not healthy version release cadence and project activity because the last version was released 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.