首页> 外国专利> Method and apparatus for locating longest prior target string matching current string in buffer

Method and apparatus for locating longest prior target string matching current string in buffer

机译:在缓冲区中定位与当前字符串匹配的最长的先前目标字符串的方法和设备

摘要

An apparatus and method are disclosed for finding a target string in a history buffer, where the found target string matches a given current string to a maximum practical length. A presorted array of array entries (SP) is defined where each entry uniquely identifies a value and a location of a respective string-start byte pair in the history buffer. The array entries are sorted primarily upon their string-start byte-pair values and secondarily upon their pointed-to locations. A direct lookup table (DLT) is further provided, indexable by each possible string-start byte pair that may appear in the history buffer. The DLT is used to locate a first array entry for a given string-start byte pair. To find a longest matching target string, the first two bytes of the current string are used as an index into the direct lookup table, and the given table entry is then used as an index into the pre-sorted SP array. The corresponding array entry is used as an index to a first target string in the buffer. Each subsequent array entry having the same string-start byte pair value is used to locate a next target string. A longest matching string is determined from among the target strings pointed to by the SP array. The location and length of the longest matching string are returned as a result.
机译:公开了一种用于在历史缓冲器中找到目标字符串的设备和方法,其中所找到的目标字符串将给定的当前字符串与最大实际长度相匹配。定义了数组条目(SP)的预排序数组,其中每个条目唯一地标识历史缓冲区中相应字符串起始字节对的值和位置。数组条目主要根据其字符串起始字节对值进行排序,其次根据其指向的位置进行排序。还提供了一个直接查找表(DLT),可由可能出现在历史记录缓冲区中的每个可能的字符串起始字节对索引。 DLT用于为给定的字符串起始字节对定位第一个数组条目。为了找到最长的匹配目标字符串,将当前字符串的前两个字节用作直接查找表的索引,然后将给定的表条目用作预排序SP数组的索引。相应的数组条目用作缓冲区中第一个目标字符串的索引。具有相同字符串起始字节对值的每个后续数组条目都用于定位下一个目标字符串。从SP数组指向的目标字符串中确定最长的匹配字符串。结果将返回最长匹配字符串的位置和长度。

著录项

  • 公开/公告号US5426779A

    专利类型

  • 公开/公告日1995-06-20

    原文格式PDF

  • 申请/专利权人 SALIENT SOFTWARE INC.;

    申请/专利号US19920839958

  • 发明设计人 LLOYD L. CHAMBERS IV;

    申请日1992-02-21

  • 分类号G06F15/40;

  • 国家 US

  • 入库时间 2022-08-22 04:04:48

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号