Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Mixing sysread() with <FILEHANDLE>?

by wanna_code_perl (Pilgrim)
on May 26, 2008 at 22:42 UTC ( #688565=note: print w/ replies, xml ) Need Help??


in reply to Re: Mixing sysread() with <FILEHANDLE>?
in thread Mixing sysread() with <FILEHANDLE>?

Thank you, this is very helpful.

I would indeed prefer not to have to use syswrite. Encoding with pack makes sense, but is there a more space-efficient way to portably transfer the data? Even with uuencoding pack("u*"), there is a 1/3 increase in required bandwidth. (True, SSH compression would mostly negate that if it is enabled, which I can not guarantee).

I need to transmit blobs of raw binary data, up to several gigabytes in a single session hence I do need to optimize for size. For my application, it's the raw bits that are important and need to be preserved. I will never be transmitting any higher-order structure.

Thank you for the advice about encapsulation as well. I have already done that. Now I just need a transmission method that works. :)


Comment on Re^2: Mixing sysread() with <FILEHANDLE>?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://688565]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-07-28 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (210 votes), past polls