Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Data compression
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Lossless == {{Main|Lossless compression}} [[Lossless data compression]] [[algorithm]]s usually exploit [[Redundancy (information theory)|statistical redundancy]] to represent data without losing any [[Self-information|information]], so that the process is reversible. Lossless compression is possible because most real-world data exhibits statistical redundancy. For example, an image may have areas of color that do not change over several pixels; instead of coding "red pixel, red pixel, ..." the data may be encoded as "279 red pixels". This is a basic example of [[run-length encoding]]; there are many schemes to reduce file size by eliminating redundancy. The [[Lempel–Ziv]] (LZ) compression methods are among the most popular algorithms for lossless storage.<ref name="Optimized LZW"/> [[DEFLATE]] is a variation on LZ optimized for decompression speed and compression ratio,<ref>{{Cite book |title=Document Management - Portable document format - Part 1: PDF1.7 |date=July 1, 2008 |publisher=Adobe Systems Incorporated |edition=1st |language=English}}</ref> but compression can be slow. In the mid-1980s, following work by [[Terry Welch]], the [[Lempel–Ziv–Welch]] (LZW) algorithm rapidly became the method of choice for most general-purpose compression systems. LZW is used in [[GIF]] images, programs such as [[PKZIP]], and hardware devices such as modems.<ref>{{Cite book|last=Stephen|first=Wolfram|url=https://www.wolframscience.com/nks/p1069--data-compression/|title=New Kind of Science|year=2002|isbn=1-57955-008-8|publisher=Wolfram Media|location=Champaign, IL|pages=1069}}</ref> LZ methods use a table-based compression model where table entries are substituted for repeated strings of data. For most LZ methods, this table is generated dynamically from earlier data in the input. The table itself is often [[Huffman coding|Huffman encoded]]. [[Grammar-based codes]] like this can compress highly repetitive input extremely effectively, for instance, a biological [[data collection]] of the same or closely related species, a huge versioned document collection, internet archival, etc. The basic task of grammar-based codes is constructing a context-free grammar deriving a single string. Other practical grammar compression algorithms include [[Sequitur algorithm|Sequitur]] and [[Re-Pair]]. The strongest modern lossless compressors use [[Randomized algorithm|probabilistic]] models, such as [[prediction by partial matching]]. The [[Burrows–Wheeler transform]] can also be viewed as an indirect form of statistical modelling.{{cn|date=May 2025}} In a further refinement of the direct use of [[probabilistic model]]ling, statistical estimates can be coupled to an algorithm called [[arithmetic coding]]. Arithmetic coding is a more modern coding technique that uses the mathematical calculations of a [[finite-state machine]] to produce a string of encoded bits from a series of input data symbols. It can achieve superior compression compared to other techniques such as the better-known Huffman algorithm. It uses an internal memory state to avoid the need to perform a one-to-one mapping of individual input symbols to distinct representations that use an integer number of bits, and it clears out the internal memory only after encoding the entire string of data symbols. Arithmetic coding applies especially well to adaptive data compression tasks where the statistics vary and are context-dependent, as it can be easily coupled with an adaptive model of the [[probability distribution]] of the input data. An early example of the use of arithmetic coding was in an optional (but not widely used) feature of the [[JPEG]] image coding standard.<ref name=TomLane/> It has since been applied in various other designs including [[H.263]], [[H.264/MPEG-4 AVC]] and [[HEVC]] for video coding.<ref name="HEVC"/> Archive software typically has the ability to adjust the "dictionary size", where a larger size demands more [[random-access memory]] during compression and decompression, but compresses stronger, especially on repeating patterns in files' content.<ref>{{cite web| url = https://www.winrar-france.fr/winrar_instructions_for_use/source/html/HELPArcOptimal.htm| title = How to choose optimal archiving settings – WinRAR}}</ref><ref>{{cite web| url = https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm| title = (Set compression Method) switch – 7zip| access-date = 2021-11-07| archive-date = 2022-04-09| archive-url = https://web.archive.org/web/20220409225619/https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm| url-status = dead}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)