Let sleeping files lie: Pattern matching in Z-compressed files

被引:97
作者
Amir, A
Benson, G
Farach, M
机构
[1] UNIV SO CALIF, DEPT MATH, LOS ANGELES, CA 90089 USA
[2] RUTGERS STATE UNIV, DIMACS, PISCATAWAY, NJ 08855 USA
基金
美国国家科学基金会;
关键词
D O I
10.1006/jcss.1996.0023
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
The current explosion of stored information necessitates a new model of pattern matching, that of compressed matching. In this model one tries to find all occurrences of a pattern in a compressed text in time proportional to the compressed text size, i.e., without decompressing the text. The most effective general purpose compression algorithms are adaptive, in that the text represented by each compression symbol is determined dynamically by the data. As a result, the encoding of a substring depends on its location. Thus the same substring may ''look different'' every time it appears in the compressed text. In this paper we consider pattern matching without decompression in the UNIX Z-compression. This is a variant of the Lempel-Ziv adaptive compression scheme. If n is the length of the compressed text and m is the length of the pattern, our algorithms find the first pattern occurrence in time O(n + m(2)) or O(n log m + m). We also introduce a new criterion to measure compressed matching algorithms, that of extra space. We show how to modify our algorithms to achieve a trade-off between the amount of extra space used and the algorithm's time complexity. (C) 1996 Academic Press, Inc.
引用
收藏
页码:299 / 307
页数:9
相关论文
共 12 条
[1]   EFFICIENT PATTERN-MATCHING WITH SCALING [J].
AMIR, A ;
LANDAU, GM ;
VISHKIN, U .
JOURNAL OF ALGORITHMS-COGNITION INFORMATICS AND LOGIC, 1992, 13 (01) :2-32
[2]  
AMIR A, 1992, PROCEEDINGS OF THE THIRD ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, P440
[3]  
Amir A., 1992, P 2 IEEE DAT COMPR C, P279
[4]  
AMIR A, 1994, P 21 INT C AUT LANG
[5]  
Dietzfelbinger M., 1988, 29th Annual Symposium on Foundations of Computer Science (IEEE Cat. No.88CH2652-6), P524, DOI 10.1109/SFCS.1988.21968
[6]  
EILAMTSOREFF T, 1988, P INT WORKSH SEQ COM
[7]  
Gu M. F., COMMUNICATION
[8]  
Knuth D. E., 1977, SIAM Journal on Computing, V6, P323, DOI 10.1137/0206024
[9]   SPACE-ECONOMICAL SUFFIX TREE CONSTRUCTION ALGORITHM [J].
MCCREIGHT, EM .
JOURNAL OF THE ACM, 1976, 23 (02) :262-272
[10]  
Weiner P., 1973, 14th Annual Symposium on Switching Automata Theory, P1