{
  "description": "Curated LZ4 ecosystem: interoperable ports and bindings, compatible CLIs, custom block implementations, compact decoders, and notable users.",
  "source": "https://lz4.org/",
  "reference": {
    "name": "lz4",
    "language": "C",
    "license": "BSD-2-Clause",
    "repository": "https://github.com/lz4/lz4",
    "formats": [
      "block",
      "frame"
    ]
  },
  "interoperable": [
    {
      "lang": "C#",
      "name": "K4os.Compression.LZ4",
      "kind": "port",
      "formats": [
        "block",
        "frame"
      ],
      "install": "dotnet add package K4os.Compression.LZ4",
      "author": "Milosz Krajewski",
      "url": "https://github.com/MiloszKrajewski/K4os.Compression.LZ4"
    },
    {
      "lang": "Dart",
      "name": "es_compression",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "dart pub add es_compression",
      "author": "Instantiations",
      "url": "https://pub.dev/documentation/es_compression/latest/lz4/"
    },
    {
      "lang": "Dart",
      "name": "dart_lz4",
      "kind": "port",
      "formats": [
        "block",
        "frame"
      ],
      "install": "dart pub add dart_lz4",
      "author": "jxoesneon",
      "url": "https://pub.dev/packages/dart_lz4"
    },
    {
      "lang": "Delphi",
      "name": "lz4-delphi",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "",
      "author": "Hanno Hugenberg",
      "url": "https://github.com/Hugie/lz4-delphi"
    },
    {
      "lang": "Go",
      "name": "pierrec/lz4",
      "kind": "port",
      "formats": [
        "block",
        "frame"
      ],
      "install": "go get github.com/pierrec/lz4/v4",
      "author": "Pierre Curto",
      "url": "https://github.com/pierrec/lz4"
    },
    {
      "lang": "Go",
      "name": "plz4",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "go get github.com/prequel-dev/plz4",
      "author": "Sean Cunningham",
      "url": "https://github.com/prequel-dev/plz4",
      "note": "cgo"
    },
    {
      "lang": "Haskell",
      "name": "lz4-frame-conduit",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "cabal install lz4-frame-conduit",
      "author": "Niklas Hambüchen",
      "url": "https://hackage.haskell.org/package/lz4-frame-conduit"
    },
    {
      "lang": "Java",
      "name": "yawkat/lz4-java",
      "kind": "hybrid",
      "formats": [
        "block",
        "frame"
      ],
      "install": "",
      "author": "Jonas Konrad",
      "url": "https://github.com/yawkat/lz4-java",
      "note": "JNI and pure Java"
    },
    {
      "lang": "Java",
      "name": "Apache Commons Compress",
      "kind": "port",
      "formats": [
        "block",
        "frame"
      ],
      "install": "",
      "author": "Apache Commons",
      "url": "https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/compressors/lz4/package-summary.html"
    },
    {
      "lang": "JavaScript",
      "name": "lz4-napi",
      "kind": "rust-binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "npm install lz4-napi",
      "author": "Antonio Musolino",
      "url": "https://github.com/antoniomuso/lz4-napi",
      "note": "Node.js, via lz4_flex"
    },
    {
      "lang": "JavaScript",
      "name": "lz4js",
      "kind": "port",
      "formats": [
        "block",
        "frame"
      ],
      "install": "npm install lz4js",
      "author": "Benzinga",
      "url": "https://github.com/Benzinga/lz4js"
    },
    {
      "lang": "Lua",
      "name": "lua-lz4",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "",
      "author": "Witchu Promjunyakul",
      "url": "https://github.com/witchu/lua-lz4"
    },
    {
      "lang": "Perl",
      "name": "Compress-LZ4Frame",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "cpanm Compress::LZ4Frame",
      "author": "Felix Bytow",
      "url": "https://metacpan.org/release/Compress-LZ4Frame"
    },
    {
      "lang": "Python",
      "name": "lz4",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "pip install lz4",
      "author": "Jonathan Underwood",
      "url": "https://pypi.org/project/lz4/"
    },
    {
      "lang": "Rust",
      "name": "lz4_flex",
      "kind": "port",
      "formats": [
        "block",
        "frame"
      ],
      "install": "cargo add lz4_flex",
      "author": "Pascal Seitz",
      "url": "https://github.com/PSeitz/lz4_flex"
    },
    {
      "lang": "Rust",
      "name": "lz4-rs",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "cargo add lz4",
      "author": "10x Genomics",
      "url": "https://github.com/10xGenomics/lz4-rs"
    },
    {
      "lang": "Rust",
      "name": "lzzzz",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "cargo add lzzzz",
      "author": "picoHz",
      "url": "https://github.com/picoHz/lzzzz"
    },
    {
      "lang": "VA Smalltalk",
      "name": "VAST Compression",
      "kind": "binding",
      "formats": [
        "block",
        "frame"
      ],
      "install": "",
      "author": "Instantiations",
      "url": "https://www.instantiations.com/vast-support/documentation/91/pr/compression2.html#pID0E0LB0FA",
      "note": "FFI"
    }
  ],
  "clis": [
    {
      "name": "smalLZ4",
      "author": "Stephan Brumme",
      "url": "https://create.stephan-brumme.com/smallz4/",
      "formats": [
        "frame"
      ]
    },
    {
      "name": "briefLZ4",
      "author": "Jørgen Ibsen",
      "url": "https://github.com/jibsen/blz4",
      "formats": [
        "frame"
      ]
    },
    {
      "name": "7Zip with LZ4",
      "author": "Tino Reichardt",
      "url": "https://github.com/mcmilk/7-Zip-zstd",
      "formats": [
        "frame"
      ]
    },
    {
      "name": "lz4ultra",
      "author": "Emmanuel Marty",
      "url": "https://github.com/emmanuel-marty/lz4ultra",
      "formats": [
        "frame"
      ]
    }
  ],
  "custom": [
    {
      "lang": "C#",
      "name": "Lz4Stream",
      "note": "streaming",
      "formats": [
        "block"
      ],
      "author": "Phill Djonov",
      "url": "https://github.com/pdjonov/Lz4Stream"
    },
    {
      "lang": "CUDA",
      "name": "NVIDIA nvCOMP",
      "note": "GPU",
      "formats": [
        "block"
      ],
      "author": "NVIDIA",
      "url": "https://docs.nvidia.com/cuda/nvcomp/lz4.html"
    },
    {
      "lang": "Delphi / Lazarus",
      "name": "LZ4 for Delphi/Lazarus",
      "note": "C binding",
      "formats": [
        "block"
      ],
      "author": "Xelitan",
      "url": "https://github.com/Xelitan/LZ4-Compression-Decompression-for-Delphi-Lazarus"
    },
    {
      "lang": "PHP",
      "name": "php-ext-lz4",
      "note": "",
      "formats": [
        "block"
      ],
      "author": "Kamijo",
      "url": "https://github.com/kjdev/php-ext-lz4"
    }
  ],
  "decoders": [
    {
      "target": "6502 & 65C02",
      "kind": "assembly",
      "author": "Peter Ferrie",
      "url": "https://github.com/pararaum/lz4-6502"
    },
    {
      "target": "Atari XL/XE",
      "kind": "assembly",
      "author": "xxl",
      "url": "http://xxl.atari.pl/lz4-decompressor/"
    },
    {
      "target": "65c816",
      "kind": "assembly",
      "author": "Olivier Zardini",
      "url": "http://www.brutaldeluxe.fr/products/crossdevtools/lz4/index.html"
    },
    {
      "target": "Z80",
      "kind": "assembly",
      "author": "Piotr Drapich",
      "url": "https://web.archive.org/web/20260815055553/http://www.union.org.pl/download/z80/LZ4_Z80.asm"
    },
    {
      "target": "Z80",
      "kind": "assembly",
      "author": "Edouard Berge",
      "url": "https://groups.google.com/forum/#!topic/lz4c/A6TLHThL0c8"
    },
    {
      "target": "8086",
      "kind": "assembly",
      "author": "E. C. Masloch",
      "url": "https://hg.pushbx.org/ecm/inicomp/"
    },
    {
      "target": "8088",
      "kind": "assembly",
      "author": "Jim Leonard",
      "url": "http://www.oldskool.org/pc/lz4_8088"
    },
    {
      "target": "68k",
      "kind": "assembly",
      "author": "Arnaud Carre",
      "url": "https://github.com/arnaud-carre/lz4-68k"
    },
    {
      "target": "v810",
      "kind": "assembly",
      "author": "Martin Wendt",
      "url": "https://github.com/enthusi/lz4_v810_decode"
    },
    {
      "target": "ARM Cortex",
      "kind": "assembly",
      "author": "Jens Bauer",
      "url": "https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/lz4-decompression-routine-for-cortex-m0-and-later"
    },
    {
      "target": "arm64",
      "kind": "assembly",
      "author": "Siguza",
      "url": "https://github.com/Siguza/lz4dec"
    },
    {
      "target": "RISC-V",
      "kind": "assembly",
      "author": "Martin Wendt",
      "url": "https://github.com/enthusi/lz4_rv32i_decode"
    },
    {
      "target": "C",
      "kind": "tiny",
      "author": "Justine Tunney",
      "url": "https://github.com/jart/cosmopolitan/blob/467504308a103865c058f9a0ac858cc22e72240e/libc/nexgen32e/lz4cpy.c"
    },
    {
      "target": "Lua",
      "kind": "",
      "author": "Scott Lembcke",
      "url": "https://github.com/slembcke/mini-lz4"
    },
    {
      "target": "PHP",
      "kind": "port",
      "author": "Stephan J. Müller",
      "url": "https://heap.ch/blog/2019/05/18/lz4-decompression/"
    },
    {
      "target": "Tcl",
      "kind": "",
      "author": "D. Bohdan",
      "url": "https://wiki.tcl-lang.org/page/LZ4"
    },
    {
      "target": "jsonlz4",
      "kind": "",
      "author": "Avi Halachmi",
      "url": "https://github.com/avih/dejsonlz4",
      "note": "custom Mozilla LZ4 format"
    }
  ],
  "used_by": [
    {
      "category": "Operating systems",
      "why": "Kernels, filesystems, and system libraries.",
      "entries": [
        {
          "name": "Linux",
          "url": "https://github.com/torvalds/linux/tree/v6.12/lib/lz4",
          "summary": "kernel image, zram and zswap, SquashFS and EROFS, dm-vdo"
        },
        {
          "name": "Android",
          "url": "https://source.android.com/docs/core/architecture/kernel/erofs",
          "summary": "system partitions in EROFS, compressed with LZ4 HC by default"
        },
        {
          "name": "macOS, iOS",
          "url": "https://developer.apple.com/documentation/compression/compression_lz4",
          "summary": "system Compression API (COMPRESSION_LZ4)"
        },
        {
          "name": "FreeBSD",
          "url": "https://docs.freebsd.org/en/books/handbook/zfs/",
          "summary": "ZFS: compression=on selects LZ4"
        },
        {
          "name": "illumos",
          "url": "https://illumos.org/man/7/zpool-features",
          "summary": "where LZ4 entered ZFS (lz4_compress feature)"
        },
        {
          "name": "DragonFly BSD",
          "url": "https://man.dragonflybsd.org/?command=hammer2&section=8",
          "summary": "HAMMER2 compresses with LZ4 by default"
        },
        {
          "name": "Zephyr",
          "url": "https://docs.zephyrproject.org/latest/develop/manifest/external/lz4.html",
          "summary": "LZ4 module of the embedded real-time OS"
        }
      ]
    },
    {
      "category": "Memory and disks",
      "why": "Fast enough to stay always on.",
      "entries": [
        {
          "name": "OpenZFS",
          "url": "https://openzfs.github.io/openzfs-docs/man/master/7/zfsprops.7.html",
          "summary": "default algorithm of compression=on"
        },
        {
          "name": "Marvell Structera X",
          "url": "https://investor.marvell.com/news-events/press-releases/detail/1037/adding-and-replacing-marvell-unveils-second-generation-structera-x-industry-first-six-channel-cxl-3-2-memory-expanders-for-ai-inference",
          "summary": "inline LZ4 compression in a CXL memory expander"
        },
        {
          "name": "ZeroPoint ZeroStorage",
          "url": "https://www.zeropoint-tech.com/products/zerostorage",
          "summary": "LZ4 in SSD controllers, transparent to the file system"
        },
        {
          "name": "HHVM",
          "url": "https://github.com/meta/hhvm/blob/2bb8db3c1678754eb8f426949f32ccfcf4ba1360/hphp/hack/src/heap/hh_shared.c#L1253",
          "summary": "shared heap of the Hack type checker, LZ4-compressed"
        }
      ]
    },
    {
      "category": "Boot and loading",
      "why": "Decompression speed shortens load times.",
      "entries": [
        {
          "name": "coreboot",
          "url": "https://github.com/coreboot/coreboot/blob/26.09/src/Kconfig",
          "summary": "romstage and verstage compressed with LZ4"
        },
        {
          "name": "U-Boot",
          "url": "https://github.com/u-boot/u-boot/blob/master/lib/lz4_wrapper.c",
          "summary": "decompresses LZ4-compressed kernels and FIT images"
        },
        {
          "name": "GRUB",
          "url": "https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/fs/zfs/zfs.c?h=grub-2.14",
          "summary": "reads LZ4-compressed ZFS pools"
        },
        {
          "name": "Emscripten",
          "url": "https://emscripten.org/docs/tools_reference/settings_reference.html#lz4",
          "summary": "LZ4-compressed file packages (-sLZ4) for WebAssembly"
        },
        {
          "name": "Firefox",
          "url": "https://github.com/mozilla-firefox/firefox/blob/893a7ba9f78f4680d50b1485c3b703bbfddda940/toolkit/mozapps/extensions/AddonManagerStartup.cpp#L204",
          "summary": "add-on startup data stored LZ4-compressed"
        }
      ]
    },
    {
      "category": "Video games",
      "why": "Fast asset loading and smaller installs.",
      "entries": [
        {
          "name": "Unity",
          "url": "https://docs.unity3d.com/Manual/assetbundles-compression-format.html",
          "summary": "caches AssetBundles in LZ4"
        },
        {
          "name": "CRYENGINE",
          "url": "https://www.cryengine.com/docs/static/engines/cryengine-5/categories/47316993/pages/87884191",
          "summary": "LZ4 in the engine third-party notices"
        },
        {
          "name": "Nintendo Switch",
          "url": "https://support.nintendo.com/jp/switch/intellectual-property/switch-family/switch.html",
          "summary": "LZ4 in the system software notices"
        },
        {
          "name": "PlayStation 4",
          "url": "https://www.playstation.com/en-us/oss/ps4/lz4-library/",
          "summary": "LZ4 in the system open-source notices"
        },
        {
          "name": "Minecraft",
          "url": "https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-5",
          "summary": "optional lz4 region-file compression (Java Edition, since 1.20.5)"
        },
        {
          "name": "Hitman 3",
          "url": "https://www.pcgamer.com/how-hitman-3s-devs-shrank-the-entire-trilogys-install-size-by-over-80gb/",
          "summary": "“almost everything in the game runs through” LZ4"
        }
      ]
    },
    {
      "category": "Network and streams",
      "why": "Compression at network speed.",
      "entries": [
        {
          "name": "Kafka",
          "url": "https://kafka.apache.org/44/configuration/topic-configs/#topicconfigs_compression.type",
          "summary": "compression.type=lz4 for messages"
        },
        {
          "name": "Spark",
          "url": "https://spark.apache.org/docs/latest/configuration.html#compression-and-serialization",
          "summary": "default codec of shuffle and broadcast data"
        },
        {
          "name": "Hugging Face Xet",
          "url": "https://huggingface.co/docs/xet/xorb",
          "summary": "model and dataset chunks in LZ4 frames"
        },
        {
          "name": "Suricata",
          "url": "https://docs.suricata.io/en/latest/configuration/suricata-yaml.html#packet-log-pcap-log",
          "summary": "packet logs (pcap-log) compressed with LZ4"
        },
        {
          "name": "Wireshark",
          "url": "https://www.wireshark.org/docs/relnotes/wireshark-4.4.0.html#_new_and_updated_features",
          "summary": "capture files in LZ4, with fast random access"
        }
      ]
    },
    {
      "category": "Databases",
      "why": "Compressed blocks read back fast.",
      "entries": [
        {
          "name": "PostgreSQL",
          "url": "https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-DEFAULT-TOAST-COMPRESSION",
          "summary": "TOAST compression, LZ4 by default since v19"
        },
        {
          "name": "MySQL",
          "url": "https://dev.mysql.com/doc/refman/8.4/en/innodb-page-compression.html",
          "summary": "InnoDB page compression"
        },
        {
          "name": "RocksDB",
          "url": "https://github.com/meta/rocksdb/wiki/Compression",
          "summary": "block compression, LZ4 recommended"
        },
        {
          "name": "Cassandra",
          "url": "https://cassandra.apache.org/doc/latest/cassandra/managing/operating/compression.html",
          "summary": "default compressor"
        },
        {
          "name": "ClickHouse",
          "url": "https://clickhouse.com/docs/sql-reference/statements/create/table",
          "summary": "default column compression (self-managed)"
        }
      ]
    },
    {
      "category": "File formats",
      "why": "Stored compressed, decoded on read.",
      "entries": [
        {
          "name": "Parquet",
          "url": "https://github.com/apache/parquet-format/blob/master/Compression.md",
          "summary": "LZ4_RAW codec"
        },
        {
          "name": "Arrow",
          "url": "https://arrow.apache.org/docs/format/Columnar.html",
          "summary": "IPC buffers in LZ4 frames"
        },
        {
          "name": "Lucene",
          "url": "https://lucene.apache.org/core/10_5_0/core/org/apache/lucene/codecs/lucene90/Lucene90StoredFieldsFormat.html",
          "summary": "stored fields LZ4-compressed by default"
        },
        {
          "name": "systemd",
          "url": "https://systemd.io/JOURNAL_FILE_FORMAT/",
          "summary": "journal compressed with LZ4"
        },
        {
          "name": "Subversion",
          "url": "https://subversion.apache.org/docs/release-notes/1.10.html",
          "summary": "LZ4 by default in repositories since 1.10"
        }
      ]
    },
    {
      "category": "Backup",
      "why": "Throughput.",
      "entries": [
        {
          "name": "BorgBackup",
          "url": "https://borgbackup.readthedocs.io/en/stable/usage/help.html",
          "summary": "LZ4 by default"
        },
        {
          "name": "Veeam",
          "url": "https://helpcenter.veeam.com/docs/backup/vsphere/compression_deduplication.html",
          "summary": "recommended (Optimal) compression level in Backup & Replication"
        },
        {
          "name": "Bareos",
          "url": "https://docs.bareos.org/Configuration/Director.html#config-Dir_Fileset_Include_Options_Compression",
          "summary": "open-source backup, recommends LZ4"
        },
        {
          "name": "Percona XtraBackup",
          "url": "https://docs.percona.com/percona-xtrabackup/8.4/create-compressed-backup.html#lz4",
          "summary": "MySQL hot backup (--compress=lz4)"
        },
        {
          "name": "pgBackRest",
          "url": "https://pgbackrest.org/configuration.html#section-general/option-compress-type",
          "summary": "PostgreSQL backup (compress-type=lz4)"
        }
      ]
    },
    {
      "category": "Accelerators",
      "why": "Offload the CPU.",
      "entries": [
        {
          "name": "Intel QAT",
          "url": "https://github.com/intel/QATzip/blob/v2.0.0/README.md",
          "summary": "LZ4 offloaded to QAT (QATzip, Gen4 and later)"
        },
        {
          "name": "NVIDIA nvCOMP",
          "url": "https://docs.nvidia.com/cuda/nvcomp/",
          "summary": "LZ4 on GPUs"
        },
        {
          "name": "CAST",
          "url": "https://www.cast-inc.com/compression/lossless-data-compression",
          "summary": "LZ4 compression IP core"
        }
      ]
    }
  ]
}
