All Projects → Brooooooklyn → snappy

Brooooooklyn / snappy

Licence: MIT license
Fastest Snappy compression library in Node.js

Programming Languages

rust
11053 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to snappy

lz4-napi
Fastest lz4 compression library in Node.js, powered by napi-rs and lz4-flex.
Stars: ✭ 29 (-73.64%)
Mutual labels:  compression, napi, node-api, napi-rs
zig-snappy
Snappy compression for Zig
Stars: ✭ 25 (-77.27%)
Mutual labels:  compression, snappy
EasyCompressor
⚡ A compression library that implements many compression algorithms such as LZ4, Zstd, LZMA, Snappy, Brotli, GZip, and Deflate. It helps you to improve performance by reducing Memory Usage and Network Traffic for caching.
Stars: ✭ 167 (+51.82%)
Mutual labels:  compression, snappy
supersnappy
Dependency-free and performant Nim Snappy implementation.
Stars: ✭ 55 (-50%)
Mutual labels:  compression, snappy
pyrus-cramjam
Thin Python wrapper to de/compression algorithms in Rust - lightweight & no dependencies
Stars: ✭ 40 (-63.64%)
Mutual labels:  compression, snappy
box
Box - Open Standard Archive Format, a zip killer.
Stars: ✭ 38 (-65.45%)
Mutual labels:  compression, snappy
tiny
compress data for better performance
Stars: ✭ 21 (-80.91%)
Mutual labels:  compression, snappy
nim-snappy
Nim implementation of Snappy compression algorithm
Stars: ✭ 14 (-87.27%)
Mutual labels:  compression, snappy
Compress
Optimized Go Compression Packages
Stars: ✭ 2,478 (+2152.73%)
Mutual labels:  compression, snappy
Zipson
JSON parse and stringify with compression
Stars: ✭ 229 (+108.18%)
Mutual labels:  compression
ConvectionKernels
Fast, high-quality texture compression library for many formats
Stars: ✭ 40 (-63.64%)
Mutual labels:  compression
Cineform Sdk
The GoPro® CineForm video codec SDK.
Stars: ✭ 219 (+99.09%)
Mutual labels:  compression
Smol V
SMOL-V: like Vulkan/Khronos SPIR-V, but smaller.
Stars: ✭ 230 (+109.09%)
Mutual labels:  compression
GenuineChannels
Collection of custom .NET Remoting channels
Stars: ✭ 29 (-73.64%)
Mutual labels:  compression
Qs
Quick serialization of R objects
Stars: ✭ 225 (+104.55%)
Mutual labels:  compression
FrameOfReference
C++ library to pack and unpack vectors of integers having a small range of values using a technique called Frame of Reference
Stars: ✭ 36 (-67.27%)
Mutual labels:  compression
Nncf
PyTorch*-based Neural Network Compression Framework for enhanced OpenVINO™ inference
Stars: ✭ 218 (+98.18%)
Mutual labels:  compression
Bedops
🔬 BEDOPS: high-performance genomic feature operations
Stars: ✭ 215 (+95.45%)
Mutual labels:  compression
php-closure-compiler
A PHP Library to use Google Closure Compiler compress Javascript
Stars: ✭ 20 (-81.82%)
Mutual labels:  compression
roadroller
Roadroller: Flattens Your JavaScript Demo
Stars: ✭ 253 (+130%)
Mutual labels:  compression

snappy

https://github.com/Brooooooklyn/snappy/actions Install size

!!! For [email protected] and below, please go to node-snappy.

More background about the 6-7 changes, please read this, Thanks @kesla .

🚀 Help me to become a full-time open-source developer by sponsoring me on Github

Fastest Snappy compression library in Node.js, powered by napi-rs and rust-snappy.

For small size data, snappyjs is faster, and it support browser. But it doesn't have async API, which is important for Node.js program.

Install this package

yarn add snappy

Support matrix

node12 node14 node16 node18
Windows x64
Windows x32
Windows arm64
macOS x64
macOS arm64
Linux x64 gnu
Linux x64 musl
Linux arm gnu
Linux arm64 gnu
Linux arm64 musl
Android arm64
Android armv7
FreeBSD x64

API

export function compressSync(input: Buffer | string | ArrayBuffer | Uint8Array): Buffer
export function compress(input: Buffer | string | ArrayBuffer | Uint8Array): Promise<Buffer>
export function uncompressSync(compressed: Buffer): Buffer
export function uncompress(compressed: Buffer): Promise<Buffer>

Performance

Hardware

OS: Windows 11 x86_64
Host: Micro-Star International Co., Ltd. MS-7C35
Kernel: 10.0.22000
Terminal: Windows Terminal
CPU: AMD Ryzen 9 5950X (32) @ 3.400GHz
Memory: 32688MiB

Result

Running "Compress" suite...
Progress: 100%

  snappy:
    4 220 ops/s, ±0.66%   | fastest

  snappy-v6:
    2 018 ops/s, ±0.84%   | 52.18% slower

  gzip:
    233 ops/s, ±0.52%     | slowest, 94.48% slower

  deflate:
    235 ops/s, ±0.45%     | 94.43% slower

  brotli:
    7 ops/s, ±0.51%       | slowest, 99.85% slower

Finished 4 cases!
  Fastest: snappy
  Slowest: brotli

Running "Decompress" suite...
Progress: 100%

  snappy:
    8 528 ops/s, ±1.03%   | fastest

  snappy-v6:
    6 357 ops/s, ±1.76%   | 25.46% slower

  gzip:
    1 406 ops/s, ±1.80%   | slowest, 83.51% slower

  deflate:
    1 435 ops/s, ±1.88%   | 83.17% slower

  brotli:
    1 208 ops/s, ±1.50%   | slowest, 86.99% slower

Finished 4 cases!
  Fastest: snappy
  Slowest: brotli
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].