For some reason I assumed it would actually spit back a char and not a number, silly me.
However, it's really not any better than ord() because it doesn't combine the bytes
for example unpack('BB','\x DA\x01') would give back (218, 1) instead of 55809
maybe if I can't figure out anything else I'll just add on an extra '\x00' and then treat it as an unsigned long......
User Profile
Collapse
-
Yet another binary file question
I know people here have answered very similar questions before, I can find some of the answers, but I'm looking for a comprehensive overview on how to deal with binary files.
My basic problem is that I am reverse engineering a binary file from a particular program. Sometimes I need to do odd things, like get a byte offset from a 3-byte chunk which has big-endian bytes, but little-endian bits within each byte, or use a multi-byte segment... -
It'll take me awhile to get my newbie head wrapped around that one, but thanks!Leave a comment:
-
Very nice, it would be good to add something about the rationale of why you would want something normalized. I assume it ease of upkeep and efficiency of searches, etc.Leave a comment:
-
It seems odd to me that that is the most efficient way to code that.
Imagine if I had 100 references, and each article had an average of 4 authors. This would lead to 400 unique author/article pairings
A very common job of a reference manager would be to sort all of the articles by authors, which requires finding out all the authors on a given article. Such info should always be available, but that would require searching...Leave a comment:
-
Grouped links between tables.
I am trying to create a bibliographic database, working with MySQL and Python, and I have a MySQL based question.
I understand how to link two tables together on a row by row basis using a scheme like this. However, references have a bit more complex structure. On any one reference you might have, say more than one author, and each author might contribute to more than one reference.
I could just have a table with rows...
No activity results to display
Show More
Leave a comment: