I goofed and called it "Fixed length records" when what would have made more sense was Run Length Encoded (RLE). Oh well. Yes, you are correct in that approach would work - I'm trying to understand how to make it work from an unpack format example. I did recently discover that it's not the format that's bad - something is odd about my data that's breaking the unpack() call. Not that it matters but I can't really do read() and sysread() since I've just grabbed the entire 10K string from a call to /usr/bin/uncompress. See 203336 and 203230 for more on that. I'll probably spend an hour tonight and follow a hexdump of the data to see where unpack is dying. As far as I know there's no way to debug unpack and see where it's falling down. It just either works or it doesn't (and it's damn annoying).
__SIG__ printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B:: +svref_2object(sub{})->OUTSIDE
In reply to Re: Re: Unpacking fixed length records
by diotalevi
in thread Unpacking fixed length records
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |