Re: Newbie Gloss questions - dynamic buffer structure

2015-01-12 Thread Zach Tellman
I'm sorry, that should have been :ubyte. Being able to insert arbitrary data into a codec is a feature, though. On Mon, Jan 12, 2015 at 6:27 AM, Tzach wrote: > Hi Zach > Thanks for the detailed response > > On Wednesday, January 7, 2015 at 7:28:06 AM UTC+2, Zach Tellman wrote: >> >> Hey Tzach, >

Re: Newbie Gloss questions - dynamic buffer structure

2015-01-12 Thread Tzach
Hi Zach Thanks for the detailed response On Wednesday, January 7, 2015 at 7:28:06 AM UTC+2, Zach Tellman wrote: > > Hey Tzach, > > If I understand what you're trying to do, you want something like this: > > [ :uint32 > :ubyte ;; or bit-seq, depending > (delimited-block (prefix uint24 #(- % 5)

Re: Newbie Gloss questions - dynamic buffer structure

2015-01-06 Thread Zach Tellman
Hey Tzach, If I understand what you're trying to do, you want something like this: [ :uint32 :ubyte ;; or bit-seq, depending (delimited-block (prefix uint24 #(- % 5) #(+ % 5))) ] And then you'll need to parse the final block separately. I've left defining the uint24 as an exercise for the