From: Waldemar Dick Date: 2011-01-27T05:47:35+09:00 Subject: Re: packing large array of mixed native types Hi, Am 26.01.2011 21:10, schrieb keithroe@gmail.com: > I have an array in the form [ uchar, float, float, float, uchar, > float, float, float, .... ] > I know I can pack it like this: > my_array.pack( "CFFFCFFFCFFF...." ) > but then I have to create a string with as many elements as the array > I am packing, > which can be quite large. Is there a way to abbreviate this string > (eg, somethign like > my_array.pack( '(CFFF)*' ) ? Why don't you read 4 elements at a time, pack them and write them in an output buffer in a loop? Just a thought. Greetings Waldemar