home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / compress / 3776 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.7 KB  |  48 lines

  1. Newsgroups: comp.compression
  2. Path: sparky!uunet!think.com!ames!purdue!yuma!cutler
  3. From: cutler@CS.ColoState.EDU (dan cutler)
  4. Subject: Request for algorithm/idea
  5. Sender: news@yuma.ACNS.ColoState.EDU (News Account)
  6. Message-ID: <Nov09.043816.85973@yuma.ACNS.ColoState.EDU>
  7. Date: Mon, 09 Nov 1992 04:38:16 GMT
  8. Nntp-Posting-Host: mozart.cs.colostate.edu
  9. Organization: Colorado State University, Computer Science Department
  10. Lines: 36
  11.  
  12. Howdy Netters!
  13.  
  14. This request may seem to be misplaced however I am searching
  15. for an algorithm (or at least a good idea where to start) for
  16. a project that really has nothing to do with data compression
  17. but similiar concepts.
  18.  
  19. I need a small procedure to QUICKLY scan a string for characters
  20. from a small set.  At first I thought to use Boyer-Moore.  But
  21. BM builds a table and works very well for large substrings with-
  22. in strings.  I suppose I could just scan the string 1 char at a
  23. time and check the char_set to see if it is there but this seems
  24. slow.
  25.  
  26. Perhaps I should state the problem in real terms:
  27.  
  28. This procedure is a PostScript filter.  My program prints entire
  29. volumes of data from databases.  Every string that is sent to
  30. the printer, is placed in parenthesis (). ie (the quick brwon) 
  31. Well, if a string looks like this (Have a nice (mediocre) day),
  32. I have to place the "(" and ")" as strings using this char "\"
  33. The new string would look like this:
  34.  (Have a nice \(mediocre\) day) and so on.  
  35.  
  36. The reason I'm posting this question here is that several compres-
  37. sion programs have advanced parsing/searching routines that may
  38. have/use similiar concepts.
  39.  
  40. Any ideas?
  41. advTHANKSance
  42. Dan Cutler 
  43.  
  44. cutler@cs.colostate.edu
  45.  
  46. btw, Assembly for pc preferred but anything accepted.
  47.  
  48.