<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Compressed_pattern_matching</id>
	<title>Compressed pattern matching - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Compressed_pattern_matching"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Compressed_pattern_matching&amp;action=history"/>
	<updated>2026-10-25T22:21:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Compressed_pattern_matching&amp;diff=8084623&amp;oldid=prev</id>
		<title>imported&gt;InternetArchiveBot: Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Compressed_pattern_matching&amp;diff=8084623&amp;oldid=prev"/>
		<updated>2023-12-19T23:18:40Z</updated>

		<summary type="html">&lt;p&gt;Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Searching for patterns in compressed data}}&lt;br /&gt;
In [[computer science]], &amp;#039;&amp;#039;&amp;#039;compressed pattern matching&amp;#039;&amp;#039;&amp;#039; (abbreviated as &amp;#039;&amp;#039;&amp;#039;CPM&amp;#039;&amp;#039;&amp;#039;) is the process of searching for patterns in compressed data with little or no decompression. Searching in a compressed string is faster than searching an uncompressed string and requires less space.&lt;br /&gt;
&lt;br /&gt;
==Compressed matching problem==&lt;br /&gt;
If the [[Data compression|compressed]] file uses a [[variable width encoding]] it could be present a problem: for example, let “100” be the [[Code word (communication)|codeword]] for &amp;#039;&amp;#039;a&amp;#039;&amp;#039; and let “110100” be the codeword for &amp;#039;&amp;#039;b&amp;#039;&amp;#039;. If we are looking for an occurrence of &amp;#039;&amp;#039;a&amp;#039;&amp;#039; in the text we could obtain as result also an occurrence that is within the codeword of &amp;#039;&amp;#039;b&amp;#039;&amp;#039;: we call this event &amp;#039;&amp;#039;false match&amp;#039;&amp;#039;. So we have to verify if the occurrence detected is effectively aligned on a codeword boundary. However we could always decode the entire text and then apply a classic [[String searching algorithm|string matching algorithm]], but this usually requires more space and time and often is not possible, for example if the compressed file is hosted online. This problem of verifying the match returned by the compressed pattern matching algorithm is a true or a false match together with the impossibility of decoding an entire text is called the &amp;#039;&amp;#039;&amp;#039;compressed matching problem&amp;#039;&amp;#039;&amp;#039;.&amp;lt;ref&amp;gt;{{cite book|title=Data Science from Scratch. First Principles with Python|url=https://python.engineering/data-science-from-scratch-first-principles-with-python/|isbn=9781491901427|author=Joel Grus|date=2019|publisher=O&amp;#039;Reilly Media|access-date=2021-08-26|archive-date=2021-08-17|archive-url=https://web.archive.org/web/20210817121416/https://python.engineering/data-science-from-scratch-first-principles-with-python/|url-status=dead}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Strategies==&lt;br /&gt;
Many strategies exist for finding the boundaries of codewords and avoiding full decompression of the text, for example:&lt;br /&gt;
*List of the indices of first bit of each codeword, where we can apply a binary search;&lt;br /&gt;
*List of the indices of first bit of each codeword with differential coding, so we can take less space within the file;&lt;br /&gt;
*[[Mask (computing)|Mask of bit]], where bit 1 marks the starting bit of each codeword;&lt;br /&gt;
*Subdivision in blocks, for a partial and aimed decompression.&lt;br /&gt;
&lt;br /&gt;
There were introduced algorithms that provide running time that grows logarithmically with the increase of string and pattern length.&amp;lt;ref&amp;gt;{{cite arXiv|title=Faster fully compressed pattern matching by recompression|date=2013-06-25|author=Artur Jeż|class=cs.DS |eprint=1111.3244}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
*Shmuel T. Klein and Dana Shapira [https://scholar.archive.org/work/42bnluwv6jfb7p4wra3diihz7m/access/wayback/http://www.dmi.unict.it/~faro/algocom/prova02/paper24.pdf PATTERN MATCHING IN HUFFMAN ENCODED TEXTS] (2003)&lt;br /&gt;
* [http://www.cs.helsinki.fi/njc/References/karpinskirs1997:172.html Marek Karpinski, Wojciech Rytter and Ayumi Shinohara. AN EFFICIENT PATTERN-MATCHING ALGORITHM FOR STRINGS WITH SHORT DESCRIPTIONS. Nordic Journal of Computing 4(2): pp.172-168 (1997).]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* {{cite journal | citeseerx = 10.1.1.44.5521 | title = Almost optimal fully LZW-compressed pattern matching | year = 1999 | pages = 316–325 }}&lt;br /&gt;
* {{citation|url=http://cc.ee.ntu.edu.tw/~yen/papers/compsac2002.pdf |title=A Dictionary-based Compressed Pattern Matching Algorithm |url-status=dead |archive-url=https://web.archive.org/web/20030313175423/http://cc.ee.ntu.edu.tw/~yen/papers/compsac2002.pdf |archive-date=March 13, 2003 }}&lt;br /&gt;
* {{cite journal | citeseerx = 10.1.1.50.1745 | title = A unifying framework for compressed pattern matching | year = 1999 | pages = 89–96 }}&lt;br /&gt;
* {{cite journal | url = http://www.i.kyushu-u.ac.jp/~takeda/papers/IPSJ40.pdf | title = Speeding Up String Pattern Matching by Text Compression: The Dawn of a New Era | access-date = 2009-03-22 | archive-url = https://web.archive.org/web/20070808170750/http://www.i.kyushu-u.ac.jp/~takeda/papers/IPSJ40.pdf | archive-date = 2007-08-08 | url-status = dead }}&lt;br /&gt;
* {{cite journal | citeseerx = 10.1.1.15.4609 | title = Shift-and approach to pattern matching in LZW compressed text | year = 1999 | pages = 1–13 }}&lt;br /&gt;
* {{cite journal | url = http://vlsi.cs.ucf.edu/nsf/files/lzw_cpm.pdf | title = LZW Algorithm }}&lt;br /&gt;
&lt;br /&gt;
{{Strings |state=collapsed}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Compressed Pattern Matching}}&lt;br /&gt;
[[Category:Data compression]]&lt;br /&gt;
[[Category:Pattern matching]]&lt;br /&gt;
[[Category:Computer data]]&lt;/div&gt;</summary>
		<author><name>imported&gt;InternetArchiveBot</name></author>
	</entry>
</feed>