How to build a binary of 1024 zeros?

Andrew Lentvorski bsder@REDACTED
Mon May 29 11:29:44 CEST 2006


Is there an equivalent to lists:duplicate(1024, 0), but for binaries?

Obviously I can just use list_to_binary(lists:duplicate(1024,0)), but I 
was wondering if there was an idiom I'm missing.

Filling a binary with a specific value seems like a pretty primitive 
operation that probably has a method I'm not seeing.

Thanks,
-a



More information about the erlang-questions mailing list