Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

zstd

From Wikipedia, the free encyclopedia
Lossless compression algorithm
".zst" redirects here. For the game console emulator also using this file extension, seeZSNES.

Zstandard
Original authorYann Collet
DevelopersYann Collet, Nick Terrell, Przemysław Skibiński[1]
Initial release23 January 2015 (2015-01-23)
Stable release
1.5.7[2] Edit this on Wikidata / 20 February 2025; 9 months ago (20 February 2025)
Repository
Written inC
Operating systemCross-platform
PlatformPortable
TypeData compression
LicenseBSD-3-Clause orGPL-2.0-or-later (dual-licensed)
Websitefacebook.github.io/zstd/ Edit this on Wikidata

Zstandard is alosslessdata compression algorithm developed by Yann Collet atFacebook.Zstd is the correspondingreference implementation inC, released asopen-source software on 31 August 2016.[3][4]

The algorithm was published in 2018 asRFC 8478, which also defines an associatedmedia type "application/zstd",filename extension "zst", andHTTP content encoding "zstd".[5]

Features

[edit]

Zstandard was designed to give acompression ratio comparable to that of theDEFLATE algorithm (developed in 1991 and used in the originalZIP andgzip programs), but faster, especially for decompression. It is tunable with compression levels ranging from negative 7 (fastest)[6] to 22 (slowest in compression speed, but best compression ratio).

Starting from version 1.3.2 (October 2017), zstd optionally implements very-long-range search and deduplication (--long, 128 MiB window) similar torzip orlrzip.[7]

Compression speed can vary by a factor of 20 or more between the fastest and slowest levels, while decompression is uniformly fast, varying by less than 20% between the fastest and slowest levels.[8] The Zstandard command-line has an "adaptive" (--adapt) mode that varies compression level depending on I/O conditions, mainly how fast it can write the output.

Zstd at its maximum compression level gives a compression ratio close tolzma,lzham, andppmx, andperforms better[vague] thanlza orbzip2.[improper synthesis?][9][10] Zstandard reaches the currentPareto frontier, as it decompresses faster than any other currently available algorithm with similar or better compression ratio.[as of?][11][12]

Dictionaries can have a large impact on the compression ratio of small files, so Zstandard can use a user-provided compression dictionary. It also offers a training mode, able to generate a dictionary from a set of samples.[13][14] In particular, one dictionary can be loaded to process large sets of files with redundancy between files, but not necessarily within each file, such as forlog files.

Design

[edit]

Zstandard combines a dictionary-matching stage (LZ77) with a large search window and a fastentropy-coding stage. It uses bothHuffman coding (used for entries in the Literals section)[15] and finite-state entropy (FSE) –a fast tabled version of ANS,tANS, used for entries in the Sequences section. Because of the manner in which FSE carries over state between symbols, decompression involves processing symbols within the Sequences section of each block in reverse order (from last to first).

Usage

[edit]
Zstandard
Filename extension
.zst[16]
Internet media type
application/zstd[16]
Magic number28 b5 2f fd[16]
Type of formatData compression
StandardRFC 8878
Websitegithub.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md
Zstandard Dictionary
Magic number37 a4 30 ec[16]
StandardRFC 8878
Websitegithub.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary-format

TheLinux kernel has included Zstandard since November 2017 (version 4.14) as a compression method for thebtrfs andsquashfs filesystems.[17][18][19]

In 2017, Allan Jude integrated Zstandard into theFreeBSD kernel,[20] and it was subsequently integrated as a compressor option for core dumps (both user programs and kernel panics). It was also used to create a proof-of-conceptOpenZFS compression method[8] which was integrated in 2020.[21]

TheAWS Redshift andRocksDB databases include support for field compression using Zstandard.[22]

In March 2018,Canonical tested[23] the use of zstd as adeb package compression method by default for theUbuntu Linux distribution. Compared withxz compression of deb packages, zstd at level 19 decompresses significantly faster, but at the cost of 6% larger package files. Support was added to Debian (and subsequently, Ubuntu) in April 2018 (in version 1.6~rc1).[24][23][25]

Fedora added ZStandard support toRPM in May 2018 (Fedora release 28) and used it for packaging the release in October 2019 (Fedora 31).[26] In Fedora 33, the filesystem is compressed by default with zstd.[27][28]

Arch Linux added support for zstd as a package compression method in October 2019 with the release of thepacman 5.2 package manager[29] and in January 2020 switched from xz to zstd for the packages in the official repository. Arch useszstd -c -T0 --ultra -20 -; the size of all compressed packages combined increased by 0.8% (compared to xz), the decompression speed is 14 times faster, decompression memory increased by 50 MiB when using multiple threads, and compression memory increased but scales with the number of threads used.[30][31][32] Arch Linux later also switched to zstd as the default compression algorithm for mkinitcpioinitial ramdisk generator.[33]

A full implementation of the algorithm with an option to choose the compression level is used in the .NSZ/.XCZ[34] file formats developed by thehomebrew community for theNintendo Switch hybrid game console.[35] It is also one of many supported compression algorithms in the .RVZWii andGameCubedisc image file format.

On 15 June 2020, Zstandard was implemented in version 6.3.8 of the zip file format with codec number 93, deprecating the previous codec number of 20 as it was implemented in version 6.3.7, released on 1 June.[36][37]

In March 2024,Google Chrome version 123 (andChromium-based browsers such asBrave orMicrosoft Edge) added zstd support in theHTTP headerContent-Encoding.[38] In May 2024,Firefox release 126.0 added zstd support in theHTTP headerContent-Encoding.[39]

License

[edit]

The reference implementation is licensed under theBSD license, published atGitHub.[40] Since version 1.0, published 31 August 2016,[41] it had an additional Grant of Patent Rights.[42]

From version 1.3.1, released 20 August 2017,[43] this patent grant was dropped and the license was changed to a BSD + GPLv2 dual license.[44]

See also

[edit]
  • LZ4 (compression algorithm) – a fast member of the LZ77 family
  • LZFSE – a similar algorithm by Apple used since iOS 9 and OS X 10.11 and made open source on 1 June 2016
  • Zlib
  • Brotli – also integrated into browsers
  • Gzip – one of the most widely used compression tools

References

[edit]
  1. ^"Contributors to facebook/zstd".github.com. Archived fromthe original on 27 January 2021. Retrieved26 January 2021.
  2. ^"Release Zstandard v1.5.7". Retrieved21 February 2025.
  3. ^Sergio De Simone (2 September 2016)."Facebook Open-Sources New Compression Algorithm Outperforming Zlib". InfoQ.Archived from the original on 7 October 2021. Retrieved20 April 2019.
  4. ^"Life imitates satire: Facebook touts zlib killer just like Silicon Valley's Pied Piper".The Register. 31 August 2016.Archived from the original on 3 September 2016. Retrieved6 September 2016.
  5. ^Collet, Yann (October 2018).Kucherawy, Murray S. (ed.).Zstandard Compression and the application/zstd Media Type. Internet Engineering Task Force Request for Comments.doi:10.17487/RFC8478.RFC8478. Retrieved7 October 2020.
  6. ^"Release Zstandard v1.3.4 - faster everything · facebook/zstd".GitHub.Archived from the original on 11 September 2021. Retrieved27 March 2024.
  7. ^"Command Line Interface for Zstandard library".GitHub. 28 October 2021.
  8. ^ab"ZStandard in ZFS"(PDF).open-zfs.org. 2017.Archived(PDF) from the original on 18 December 2019. Retrieved20 April 2019.
  9. ^Matt Mahoney."Silesia Open Source Compression Benchmark".Archived from the original on 21 January 2022. Retrieved10 May 2019.
  10. ^Matt Mahoney (29 August 2016)."Large Text Compression Benchmark, .2157 zstd".Archived from the original on 31 March 2022. Retrieved1 September 2016.
  11. ^TurboBench: Static/Dynamic web content compression benchmark, PowTurbo,archived from the original on 17 March 2022, retrieved21 March 2018
  12. ^Matt Mahoney,Silesia Open Source Compression Benchmark,archived from the original on 21 January 2022, retrieved5 April 2018
  13. ^"Facebook developers report massive speedups and compression ratio improvements when using dictionaries"(PDF).Fermilab. 11 October 2017.Archived(PDF) from the original on 25 January 2018. Retrieved27 March 2024.
  14. ^"Smaller and faster data compression with Zstandard". Facebook. 31 August 2016.Archived from the original on 8 November 2020. Retrieved3 September 2016.
  15. ^"facebook/zstd".GitHub. 28 October 2021.
  16. ^abcdCollet, Yann (February 2021).Kucherawy, Murray S. (ed.).Zstandard Compression and the application/zstd Media Type. Internet Engineering Task Force Request for Comments.doi:10.17487/RFC8878.RFC8878. Retrieved26 February 2023.
  17. ^Corbet, Jonathan (17 September 2017)."The rest of the 4.14 merge window [LWN.net]".lwn.net.Archived from the original on 22 November 2021. Retrieved27 March 2024.
  18. ^"Linux_4.14 - Linux Kernel Newbies". Kernelnewbies.org. 30 December 2017.Archived from the original on 10 January 2018. Retrieved16 August 2018.
  19. ^Larabel, Michael (8 September 2017)."Zstd Compression For Btrfs & Squashfs Set For Linux 4.14, Already Used Within Facebook - Phoronix".www.phoronix.com.Archived from the original on 25 July 2019. Retrieved13 November 2017.
  20. ^"Integrate ZSTD into the kernel · freebsd/Freebsd-SRC@28ef165".GitHub.
  21. ^"Add ZSTD support to ZFS · openzfs/ZFS@10b3c7f".GitHub.Archived from the original on 10 September 2020. Retrieved12 October 2020.
  22. ^"Zstandard Encoding - Amazon Redshift". 20 April 2019.Archived from the original on 14 August 2021. Retrieved24 January 2018.
  23. ^abLarabel, Michael (12 March 2018)."Canonical Working On Zstd-Compressed Debian Packages For Ubuntu".phoronix.com. Phoronix Media.Archived from the original on 16 August 2021. Retrieved29 October 2019.The developers at Canonical are considering a feature freeze exception to get this newly-developed Zstd Apt/Dpkg support in Ubuntu 18.04 LTS. In doing so, they mention they would be looking at enabling Zstd compression for packages by default in Ubuntu 18.10.
  24. ^"New Ubuntu Installs Could Be Speed Up by 10% with the Zstd Compression Algorithm".Softpedia. 12 March 2018.Archived from the original on 6 October 2021. Retrieved13 August 2018.
  25. ^"Debian Changelog for apt".Debian. 19 April 2021. Retrieved7 November 2022.
  26. ^"Changes/Switch RPMS to ZSTD compression".Fedora Project Wiki.Archived from the original on 2 June 2019. Retrieved8 July 2020.
  27. ^"Fedora Workstation 34 feature focus: Btrfs transparent compression".Fedora Magazine. 14 April 2021. Retrieved12 May 2022.
  28. ^"Changes/BtrfsTransparentCompression".Fedora Project Wiki. Retrieved12 May 2022.
  29. ^Larabel, Michael (16 October 2019)."Arch Linux Nears Roll-Out of ZSTD Compressed Packages for Faster Pacman Installs".Phoronix.Archived from the original on 18 March 2022. Retrieved21 October 2019.
  30. ^Broda, Mara (4 January 2020)."Now using Zstandard instead of xz for package compression".Arch Linux.Archived from the original on 18 March 2022. Retrieved5 January 2020.
  31. ^Broda, Mara (25 March 2019)."RFC: (devtools) Changing default compression method to zstd".arch-dev-public (Mailing list).Archived from the original on 17 August 2021. Retrieved5 January 2020.
  32. ^Broda, Mara; Polyak, Levente (27 December 2019)."makepkg.conf: change default compression method to zstd".GitHub.
  33. ^Razzolini, Giancarlo (19 February 2021)."News: Moving to Zstandard images by default on mkinitcpio".Arch Linux. Retrieved28 December 2021.
  34. ^"RELEASE - nsZip - NSP compressor/decompressor to reduce storage".GBAtemp.net - The Independent Video Game Community. 20 October 2019.Archived from the original on 15 August 2021. Retrieved3 November 2019.
  35. ^Bosshard, Nico (31 October 2019),nsZip is a tool to compress/decompress Nintendo Switch games using the here specified NSZ file format: nicoboss/nsZip,archived from the original on 27 March 2022, retrieved3 November 2019
  36. ^APPNOTE.TXT - .ZIP File Format Specification Version: 6.3.8, 15 June 2020, retrieved7 July 2020
  37. ^APPNOTE.TXT - .ZIP File Format Specification Version: 6.3.7, 1 June 2020, retrieved6 June 2020
  38. ^"New in Chrome 123 | Chrome Blog".Chrome for Developers. 19 March 2024. Retrieved16 April 2024.
  39. ^"Firefox 126.0, See All New Features, Updates and Fixes".Archived from the original on 13 May 2024. Retrieved15 May 2024.
  40. ^"Facebook open sources Zstandard data compression algorithm, aims to replace technology behind Zip".ZDnet. 31 August 2016. Retrieved1 September 2016.
  41. ^"Zstandard v1.0".GitHub. 31 August 2016.Archived from the original on 7 April 2023. Retrieved23 January 2025.
  42. ^"v1.3.0/PATENTS · facebook/zstd".GitHub. 30 August 2016.Archived from the original on 15 May 2021. Retrieved27 March 2024.
  43. ^"Release Zstandard v1.3.1 · facebook/zstd".GitHub. 20 August 2017.Archived from the original on 12 September 2020. Retrieved27 March 2024.
  44. ^"New license by Cyan4973 · Pull Request #801 · facebook/zstd".GitHub. 19 August 2017.Archived from the original on 12 September 2020. Retrieved27 March 2024.

External links

[edit]
Lossless
type
Entropy
Dictionary
Other
Hybrid
Lossy
type
Transform
Predictive
Audio
Concepts
Codec
parts
Image
Concepts
Methods
Video
Concepts
Codec
parts
Theory
Community
People
Archiving only
Compressing only
Archiving
and compressing
Software packaging
and distributing
Document packaging
and distributing
Retrieved from "https://en.wikipedia.org/w/index.php?title=Zstd&oldid=1312974596"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp