zoukankan      html  css  js  c++  java
  • bmdiff snappy lzw gzip

    https://github.com/google/snappy

    Introduction

    【速度第一,压缩比适宜】

    【favors speed over compression ratio】

    Snappy is a compression/decompression library. It does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression. For instance, compared to the fastest mode of zlib, Snappy is an order of magnitude faster for most inputs, but the resulting compressed files are anywhere from 20% to 100% bigger. (For more information, see "Performance", below.)

    Snappy has the following properties:

    • Fast: Compression speeds at 250 MB/sec and beyond, with no assembler code. See "Performance" below.
    • Stable: Over the last few years, Snappy has compressed and decompressed petabytes of data in Google's production environment. The Snappy bitstream format is stable and will not change between versions.
    • Robust: The Snappy decompressor is designed not to crash in the face of corrupted or malicious input.
    • Free and open source software: Snappy is licensed under a BSD-type license. For more information, see the included COPYING file.

    Snappy has previously been called "Zippy" in some Google presentations and the like.

    Performance

    【64-bit】

    【i7 c,d = 250,500 MB/sec】

    【compress ratio plain text,HTML,JPEGs PNGS = 1.5-1.7x,2-4x,1.0x】

    Snappy is intended to be fast. On a single core of a Core i7 processor in 64-bit mode, it compresses at about 250 MB/sec or more and decompresses at about 500 MB/sec or more. (These numbers are for the slowest inputs in our benchmark suite; others are much faster.) In our tests, Snappy usually is faster than algorithms in the same class (e.g. LZO, LZF, QuickLZ, etc.) while achieving comparable compression ratios.

    Typical compression ratios (based on the benchmark suite) are about 1.5-1.7x for plain text, about 2-4x for HTML, and of course 1.0x for JPEGs, PNGs and other already-compressed data. Similar numbers for zlib in its fastest mode are 2.6-2.8x, 3-7x and 1.0x, respectively. More sophisticated algorithms are capable of achieving yet higher compression rates, although usually at the expense of speed. Of course, compression ratio will vary significantly with the input.

    Although Snappy should be fairly portable, it is primarily optimized for 64-bit x86-compatible processors, and may run slower in other environments. In particular:

    • Snappy uses 64-bit operations in several places to process more data at once than would otherwise be possible.
    • Snappy assumes unaligned 32- and 64-bit loads and stores are cheap. On some platforms, these must be emulated with single-byte loads and stores, which is much slower.
    • Snappy assumes little-endian throughout, and needs to byte-swap data in several places if running on a big-endian platform.

    https://google.github.io/snappy/

  • 相关阅读:
    Git使用感悟
    Just open sourced the JavaScript Inlay Hints Provider function in IDEA plugin React Native Console commercial version
    Flutter和React Native组件层级对比
    React Native 迁移到 Flutter 心得体会[持续更新中]
    IntelliJ IDEA 2020.3 EAP 新特性: 拖动分割编辑器,新欢迎窗口等
    Universal Abstract Syntax Tree (UAST)
    Creating your first Flutter project using WebStorm 2020
    WIN10系统跑流量,彻底杜绝win10更新程序后台下载
    linux centos7安装mysql5.7(安装版)教程
    VMware启动虚拟机一直处于黑屏且无反应
  • 原文地址:https://www.cnblogs.com/rsapaper/p/7704414.html
Copyright © 2011-2022 走看看