Snappy (compression)

Snappy
Original authorsJeff Dean, Sanjay Ghemawat, Steinar H. Gunderson
DeveloperGoogle
ReleaseMarch 18, 2011 (2011-03-18)
Stable release
1.1.10 / March 9, 2023 (2023-03-09)
Written inC++
Operating systemCross-platform
PlatformPortable
Size1.1 MiB
Typedata compression
LicenseApache 2 (up to 1.0.1)/New BSD
Websitegoogle.github.io/snappy/
Repository
Snappy framed
Filename extension
.sz
Internet media type
application/x-snappy-framed
Magic numberff 06 00 00 73 4e 61 50 70 59 (FF 06 00 00 "sNaPpY")
Type of formatData compression
Open format?yes
Free format?yes
Websitegithub.com/google/snappy/blob/main/framing_format.txt

Snappy (previously known as Zippy) is a fast data compression and decompression library written in C++ by Google based on ideas from LZ77 and open-sourced in 2011. It does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression. Compression speed is 250 MB/s and decompression speed is 500 MB/s using a single core of a circa 2011 "Westmere" 2.26 GHz Core i7 processor running in 64-bit mode. The compression ratio is 20–100% lower than gzip.

Snappy is widely used in Google projects like Bigtable, MapReduce and in compressing data for Google's internal RPC systems. It can be used in open-source projects like MariaDB ColumnStore, Cassandra, Couchbase, Hadoop, LevelDB, MongoDB, RocksDB, Lucene, Spark, Parquet, InfluxDB, and Ceph. Firefox uses Snappy to compress data in localStorage. Decompression is tested to detect any errors in the compressed stream. Snappy does not use inline assembler (except some optimizations) and is portable.