Then you're back to using unpack 'B*', ....
However, there is still no need to read the whole file into memory. The same techniques used for the byte aligned would work just the same for bit aligned once you convert the stream to asci-ized binary. I would probably chain two processes together.
- Convert to ascii-ized binary, locate the offset and discard the junk using the same process as above.
Having aligned the datastream, it would then convert back to properly byte aligned binary and write 384 bytes binary packets to STDOUT.
- The second process would just be the working byte aligned version above.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
| [reply] [d/l] |
You help has been greatly appreciated. Thanks again.
| [reply] |