Traversing a binary

klacke <>
Tue Sep 21 20:20:24 CEST 2004

On Tue, Sep 21, 2004 at 03:51:10PM +0200, Javier París Fernández wrote:
> Hi,
> I need to add all the two-byte pairs of a binary to make a checksum.
> Using the bit syntax is correct, but too slow. Is there a way to have
> some "iterator" over its contents without having to do pattern matching
> on the binary(Which is slow) ?

To get this _fast_, you have to write a linked-in driver. Make sure
the binary doesn't copied down to the driver.


Claes Wikstrom                        -- Caps lock is nowhere and                  -- everything is under control          

More information about the erlang-questions mailing list