Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion reading binary blob
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brian Craft  
View profile  
 More options Oct 8 2012, 10:13 pm
From: Brian Craft <craft.br...@gmail.com>
Date: Mon, 8 Oct 2012 19:13:43 -0700 (PDT)
Local: Mon, Oct 8 2012 10:13 pm
Subject: reading binary blob

I need to parse some floats from a binary blob. The whole blob is floats,
so the number of floats can be found from the blob size.

 Is gloss the best way to do it? Is there anything simpler? gloss doesn't
seem to have a nice way to saying "read floats until you run out of bytes".
I also couldn't get the (repeat) call to work for this. It seems to have
its own ideas about how data should look, rather than being a general
parser. I was eventually able to get it to work by doing

(gloss.core/compile-frame {:scores (repeat count :float32)})

before decoding each record, which creates a gloss codec for each record,
which seems a bit much.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.