W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > September to December 1994

Re: HTTP: T-T-T-Talking about MIME Generation

From: Larry Masinter <masinter@parc.xerox.com>
Date: Fri, 16 Dec 1994 10:54:13 PST
To: jim@spyglass.com
Cc: http-wg%cuckoo.hpl.hp.com@hplb.hpl.hp.com
Message-Id: <94Dec16.105417pst.2760@golden.parc.xerox.com>
You don't need content-length to search for the boundary. You can go
ahead and scan the binary data for <CR><LF>--boundary--<CR><LF>. Doing
so either using a simple scan or using a more elaborate boyer-moore
algorithm should be computationally not significantly more expensive
than merely counting bytes. 

At first glance, you might not think so, but both searching and
counting are order-N algorithms; some systems have optimized
block-move, but most C programmers don't think twice about using
strcpy, which is, after all, searching for a null byte. Using
boyer-moore, searching for a long string is more efficient than
searching for a short one.
Received on Friday, 16 December 1994 10:58:33 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:31:09 EDT