Compressed pattern matching
In computer science, compressed pattern matching (abbreviated as CPM) is the process of searching for patterns in compressed data with little or no decompression.[src] Searching in a compressed string is faster than searching an uncompressed string and requires less space.[src]
In computer science, compressed pattern matching (abbreviated as CPM) is the process of searching for patterns in compressed data with little or no decompression.[src] Searching in a compressed string is faster than searching an uncompressed string and requires less space.[src] ==Compressed matching problem== If the compressed file uses a variable width encoding it could be present a problem: for example, let “100” be the codeword for a and let “110100” be the codeword for b.[src] If we are looking for an occurrence of a in the text we could obtain as result also an occurrence that is within the codeword of b: we call this event false match.[src] So we have to verify if the occurrence detected is effectively aligned on a codeword boundary.[src] However we could always decode the entire text and then apply a classic 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.[src] 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 compressed matching problem.[src] ==Strategies== Many strategies exist for finding the boundaries of codewords and avoiding full decompression of the text, for example: List of the indices of first bit of each codeword, where we can apply a binary search; List of the indices of first bit of each codeword with differential coding, so we can take less space within the file; Mask of bit, where bit 1 marks the starting bit of each codeword; Subdivision in blocks, for a partial and aimed decompression.[src] There were introduced algorithms that provide running time that grows logarithmically with the increase of string and pattern length.[src]
11 sentences · 11 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Compressed pattern matching." encyclopegia.org, 2026, https://encyclopegia.org/wiki/compressed-pattern-matching. Accessed 26 November 2026.
Chicago
"Compressed pattern matching." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/compressed-pattern-matching.
APA
encyclopegia.org. (2026). Compressed pattern matching. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/compressed-pattern-matching
Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON