in reply to Re^2: pack/unpack binary editing
in thread pack/unpack binary editing
Mostly because I am sure that I won't be getting any interference from IOLayers, Unicode conversions or whatever. That may be paranoia, but I believe that I have had the situation where a random piece of binary data has looked sufficiently like unicode to cause is to be upgraded by some action. This may have been on 5.6.1 before the unicode support was sorted out--by why risk it?
Also, if you're randomly accessing the file and reading bytes, any buffering Perl or the C-runtime does is unlikely to be helpful. I have some evidence that on Win32, you can get a non-useful interaction between PerlIO's caching efforts and those done by the OS itself. One I can avoid, the other not, so I avoid the one I can.
Let me turn your question around: Why wouldn't you use sysread/syswrite/sysseek when processing a binary file?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: pack/unpack binary editing
by blazar (Canon) on Feb 08, 2005 at 14:20 UTC | |
by BrowserUk (Patriarch) on Feb 08, 2005 at 17:13 UTC |