On Thursday 06 August 2009 20:50:30 Martin P. Hellwig wrote:
Thanks all for your insights and suggestions.
It seems to me that there are a couple of ways to this bit manipulation
and a couple of foreign modules to assist you with that.
Would it be worth the while to do a PEP on this?
On Aug 5, 10:46 am, Martin P. Hellwig martin.hell...@dcuktec.org
wrote:
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
|
Paul Rubin wrote:
Martin P. Hellwig martin.hell...@dcuktec.org writes:
Is there an advantage using shifts and masks over my kitchen type solution?
Weren't you complaining about the 8-to-1 expansion from turning each bit
to an ascii char?
One warning to Martin:
If you want your
On Wednesday 05 August 2009 16:46:13 Martin P. Hellwig wrote:
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
| Version |
On Wednesday 05 August 2009 20:12:05 Paul Rubin wrote:
Martin P. Hellwig martin.hell...@dcuktec.org writes:
what I usually do is read the packet in binary mode, convert the
output to a concatenated 'binary string'(i.e. '0101011000110') and
Something wrong with reading the data words as an
On Wednesday 05 August 2009 21:41:26 Martin P. Hellwig wrote:
Yes you are (of course) right, my 'dream' solution would be something
that accepts slice indeces on bit level. Your reasoning did reveal some
flaws in my approach though ;-)
This is the first time I have been compared to the
On Aug 5, 3:46 pm, Martin P. Hellwig martin.hell...@dcuktec.org
wrote:
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
|
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
| Version | Command | Instruction | Data Length | Data | Filler |
On 5 Aug, 15:46, Martin P. Hellwig martin.hell...@dcuktec.org
wrote:
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
|
Jon Clements wrote:
cut
IIRC (and I have my doubts) the BitVector module may be of use, but
it's been about 3 years since I had to look at it. I think it used the
C equiv. of short ints to do its work. Otherwise, maybe the array
module, the struct module or even possibly ctypes.
Not much use,
Martin P. Hellwig:
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
| Version | Command | Instruction | Data Length | Data | Filler |
On 5 Aug 2009, at 16:46 , Martin P. Hellwig wrote:
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
| Version | Command |
On 5 Aug 2009, at 19:17 , Bearophile wrote:
Have you tried Hachoir? (I think its name may be changed to Fusil, I
don't know).
Name hasn't been changed (I think fusil is a subproject, something
like that) on the other hand the hachoir.org site is dead.
But apparently Hachoir was moved to
Martin P. Hellwig martin.hell...@dcuktec.org writes:
what I usually do is read the packet in binary mode, convert the
output to a concatenated 'binary string'(i.e. '0101011000110') and
Something wrong with reading the data words as an integer and using
old fashioned shifts and masks to get at
Paul Rubin wrote:
Martin P. Hellwig martin.hell...@dcuktec.org writes:
what I usually do is read the packet in binary mode, convert the
output to a concatenated 'binary string'(i.e. '0101011000110') and
Something wrong with reading the data words as an integer and using
old fashioned shifts
Paul Rubin wrote:
Martin P. Hellwig martin.hell...@dcuktec.org writes:
Is there an advantage using shifts and masks over my kitchen type solution?
Weren't you complaining about the 8-to-1 expansion from turning each bit
to an ascii char?
Yes you are (of course) right, my 'dream' solution
On 5 Aug, 20:41, Martin P. Hellwig martin.hell...@dcuktec.org
wrote:
Paul Rubin wrote:
Martin P. Hellwig martin.hell...@dcuktec.org writes:
Is there an advantage using shifts and masks over my kitchen type solution?
Weren't you complaining about the 8-to-1 expansion from turning each bit
En Wed, 05 Aug 2009 11:46:13 -0300, Martin P. Hellwig
martin.hell...@dcuktec.org escribió:
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
18 matches
Mail list logo