BlackBox Component Builder
Download  Extensions  GitHub  Chat  Wiki  Forum  Support 


File Searching.

GftSearch allows multiple strings to be searched simultaneously. Arbitrary directories and files can be searched. For example one can search for the following 3 strings simultaneously:    callback    call back    procedure variable Options OR    specifies that any of the entered strings found in a file will trigger a report. AND  specifies that all of the entered strings must be in a file to trigger a report. The search mechanism builds a finite state machine that simultaneously looks for all strings sought (there can be hundreds of them). Search time is independent of the number of strings sought and is a linear function of the length of file searched. The core GftSearch can be embedded in a large number of applications since the user determines from whence the bytes comes and how to handle pattern matching when it occurs (See GftSearchFile for example). The routine is very fast and examines each byte in a file only once. The routine is based on XSearch developed by Scott Daniels and Pentti Kanerva in the 1970s. Compared to BlackBox 'Search' it is about 5 times faster (this must be qualified since the first time 'Docu' is searched both techniques yeild similar times. It is the second and subsequent times that Docu is seached that the speedup occurs. I believe this has nothing to do with search initialization but rather with Blackbox or Microsoft's dirctory allocation scheme). GtfSearch

Author: Douglas G. Danforth
Published by: Anton Shelin
Русский English


Publish your extensions for
BlackBox Component Builder.

Sign up


remember me