Say that I have a strange character group that I want to find in a binary
file.
I wanted to use something like this:

(define needle (list->string (map integer->char (list #xab #xcd #xef))))
(define needle-offset
  (call-with-input-file "big_binary_blob.bin"
    #:mode 'binary
    (λ (p)
      (regexp-match-positions (regexp needle) p))))

The "regexp-match-positions" returns #f (even though I know that needle is
in there, I put it there). Is there a better way to go about this? The
binary blob is about 100 MiB or so, if that helps.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CACgrOxJwV_xGV1P96F6rY%3D%2BBdXDRSjgRPUrz1BhUUiMXqqt3vA%40mail.gmail.com.

Reply via email to