All Projects → guzba → supersnappy

guzba / supersnappy

Licence: MIT license
Dependency-free and performant Nim Snappy implementation.

Programming Languages

nim
578 projects

Projects that are alternatives of or similar to supersnappy

pyrus-cramjam
Thin Python wrapper to de/compression algorithms in Rust - lightweight & no dependencies
Stars: ✭ 40 (-27.27%)
Mutual labels:  compression, snappy
tiny
compress data for better performance
Stars: ✭ 21 (-61.82%)
Mutual labels:  compression, snappy
box
Box - Open Standard Archive Format, a zip killer.
Stars: ✭ 38 (-30.91%)
Mutual labels:  compression, snappy
nim-snappy
Nim implementation of Snappy compression algorithm
Stars: ✭ 14 (-74.55%)
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 (+203.64%)
Mutual labels:  compression, snappy
snappy
Fastest Snappy compression library in Node.js
Stars: ✭ 110 (+100%)
Mutual labels:  compression, snappy
Compress
Optimized Go Compression Packages
Stars: ✭ 2,478 (+4405.45%)
Mutual labels:  compression, snappy
zig-snappy
Snappy compression for Zig
Stars: ✭ 25 (-54.55%)
Mutual labels:  compression, snappy
lossyless
Generic image compressor for machine learning. Pytorch code for our paper "Lossy compression for lossless prediction".
Stars: ✭ 81 (+47.27%)
Mutual labels:  compression
go7z
A native Go 7z archive reader.
Stars: ✭ 46 (-16.36%)
Mutual labels:  compression
zpaqfranz
Deduplicating archiver with encryption and paranoid-level tests. Swiss army knife for the serious backup and disaster recovery manager. Ransomware neutralizer. Win/Linux/Unix
Stars: ✭ 86 (+56.36%)
Mutual labels:  compression
zstd-rs
zstd-decoder in pure rust
Stars: ✭ 148 (+169.09%)
Mutual labels:  compression
power-gzip
POWER9 gzip engine documentation and code samples
Stars: ✭ 16 (-70.91%)
Mutual labels:  compression
NBT
A java implementation of the NBT protocol, including a way to implement custom tags.
Stars: ✭ 128 (+132.73%)
Mutual labels:  compression
salvador
A free, open-source compressor for the ZX0 format
Stars: ✭ 35 (-36.36%)
Mutual labels:  compression
MEGA Manager
Cloud syncing manager for multiple MEGA cloud storage accounts with syncing, data gathering, compresssion and optimization capabilities.
Stars: ✭ 29 (-47.27%)
Mutual labels:  compression
Lib.AspNetCore.WebSocketsCompression
[Archived] Lib.AspNetCore.WebSocketsCompression is a library which provides a managed implementation of the WebSocket protocol, along with server integration components and support for permessage-deflate compression.
Stars: ✭ 23 (-58.18%)
Mutual labels:  compression
VszLib
7-zip VB6 Helper
Stars: ✭ 35 (-36.36%)
Mutual labels:  compression
qlZipInfo
MacOSX QuickLook Generator for zip, jar, tar, tar.gz (.tgz), tar.bz2 (.tbz2/.tbz), tar.Z. xar (.xar, .pkg), debian (.deb), RedHat Package Manager (.rpm), 7zip (.7z), xz, Microsoft cabinet (.cab), gzip (.gz), lha, BinHex 4.0 (.hqx), and Stuffit (.sit) archives, and ISO9660 images
Stars: ✭ 47 (-14.55%)
Mutual labels:  compression
nason
🗜 Ultra tiny serializer / encoder with plugin-support. Useful to build binary files containing images, strings, numbers and more!
Stars: ✭ 30 (-45.45%)
Mutual labels:  compression

Supersnappy

Github Actions

nimble install supersnappy

Supersnappy is a pure Nim implementation of Google's Snappy compression algorithm. The goal of this library is to be small, straightforward, dependency-free and highly performant.

Supersnappy can be used at compile time too. This is great for baking assets into executables in compressed form. Check out an example here.

To ensure Supersnappy is compatible with other Snappy implementations, tests/validate.nim can be run. This script verifies that data compressed by Supersnappy can be uncompressed by other implementations (and that other implementations can uncompress data compressed by Supersnappy).

Supersnappy works well using Nim's relatively new --gc:arc and --gc:orc as well as the default garbage collector. This library also works using both nim c and nim cpp, in addition to --cc:vcc on Windows.

I have also verified that Supersnappy builds with --experimental:strictFuncs on Nim 1.4.0.

Docs

https://nimdocs.com/guzba/supersnappy/supersnappy.html

Performance

Benchmarks can be run comparing different Snappy implementations. My benchmarking shows this library performs significantly better in all cases than alternatives. Check the performance yourself by running tests/benchmark.nim.

nim c --gc:arc -d:release -r .\tests\benchmark.nim (100 compress-uncompress cycles, lower time is better)

https://github.com/guzba/supersnappy
name ............................... min time      avg time    std dv   runs
alice29.txt ........................ 0.504 ms      0.513 ms    ±0.020  x1000
asyoulik.txt ....................... 0.447 ms      0.451 ms    ±0.006  x1000
fireworks.jpg ...................... 0.013 ms      0.015 ms    ±0.001  x1000
geo.protodata ...................... 0.100 ms      0.106 ms    ±0.008  x1000
html ............................... 0.120 ms      0.128 ms    ±0.013  x1000
html_x_4 ........................... 0.524 ms      0.534 ms    ±0.014  x1000
kppkn.gtb .......................... 0.422 ms      0.435 ms    ±0.028  x1000
lcet10.txt ......................... 1.362 ms      1.380 ms    ±0.028  x1000
paper-100k.pdf ..................... 0.040 ms      0.041 ms    ±0.002  x1000
plrabn12.txt ....................... 1.885 ms      1.898 ms    ±0.020  x1000
urls.10K ........................... 1.565 ms      1.574 ms    ±0.009  x1000
https://github.com/dfdeshom/nimsnappy
alice29.txt ........................ 0.590 ms      0.599 ms    ±0.017  x1000
asyoulik.txt ....................... 0.525 ms      0.529 ms    ±0.005  x1000
fireworks.jpg ...................... 0.011 ms      0.011 ms    ±0.000  x1000
geo.protodata ...................... 0.100 ms      0.101 ms    ±0.002  x1000
html ............................... 0.118 ms      0.127 ms    ±0.017  x1000
html_x_4 ........................... 0.553 ms      0.559 ms    ±0.006  x1000
kppkn.gtb .......................... 0.517 ms      0.523 ms    ±0.009  x1000
lcet10.txt ......................... 1.585 ms      1.599 ms    ±0.018  x1000
paper-100k.pdf ..................... 0.017 ms      0.017 ms    ±0.000  x1000
plrabn12.txt ....................... 2.224 ms      2.237 ms    ±0.017  x1000
urls.10K ........................... 1.826 ms      1.842 ms    ±0.021  x1000
https://github.com/NimCompression/nimsnappyc
alice29.txt ........................ 0.605 ms      0.609 ms    ±0.004  x1000
asyoulik.txt ....................... 0.513 ms      0.518 ms    ±0.005  x1000
fireworks.jpg ...................... 0.014 ms      0.020 ms    ±0.004  x1000
geo.protodata ...................... 0.144 ms      0.150 ms    ±0.010  x1000
html ............................... 0.169 ms      0.172 ms    ±0.004  x1000
html_x_4 ........................... 0.701 ms      0.712 ms    ±0.009  x1000
kppkn.gtb .......................... 0.510 ms      0.515 ms    ±0.005  x1000
lcet10.txt ......................... 1.653 ms      1.666 ms    ±0.022  x1000
paper-100k.pdf ..................... 0.047 ms      0.049 ms    ±0.003  x1000
plrabn12.txt ....................... 2.073 ms      2.092 ms    ±0.024  x1000
urls.10K ........................... 1.873 ms      1.899 ms    ±0.028  x1000
https://github.com/status-im/nim-snappy
alice29.txt ........................ 0.609 ms      0.615 ms    ±0.005  x1000
asyoulik.txt ....................... 0.529 ms      0.536 ms    ±0.015  x1000
fireworks.jpg ...................... 0.010 ms      0.011 ms    ±0.001  x1000
geo.protodata ...................... 0.131 ms      0.135 ms    ±0.004  x1000
html ............................... 0.151 ms      0.156 ms    ±0.004  x1000
html_x_4 ........................... 0.647 ms      0.657 ms    ±0.016  x1000
kppkn.gtb .......................... 0.519 ms      0.523 ms    ±0.006  x1000
lcet10.txt ......................... 1.640 ms      1.650 ms    ±0.010  x1000
paper-100k.pdf ..................... 0.019 ms      0.020 ms    ±0.001  x1000
plrabn12.txt ....................... 2.232 ms      2.243 ms    ±0.011  x1000
urls.10K ........................... 1.796 ms      1.810 ms    ±0.023  x1000

Testing

nimble test

To prevent Supersnappy from causing a crash or otherwise misbehaving on bad input data, a fuzzer has been run against it. You can do run the fuzzer any time by running nim c -r tests/fuzz.nim

Credits

This implementation was heavily influenced by snappy-c.

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].