Is there a way to see, via hex editor or otherwise, if data in a binary file is aligned or packed, specifically for an HPUX system?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you know what you are looking for and can recognize it in a hex dump, then you can make informed estimates about whether the data is aligned or not, or packed. But in many ways, your question is unanswerable. Where did the data come from? Why can’t you ask the person (driving a program, presumably) how it was created?
If you are asking ‘what tools could I use to view the data’, then you can consider:
Or you could do it in Perl. Once upon a long time ago (1987 or so), I wrote a program odx (octal dump in hex – weird) that I continue to use – it gives me a hex dump, 16 bytes per line, plus an image of the printable characters. This example isn’t very exciting (odx run on itself – on a Sun Sparc):