Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Mixing sysread() with ?

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?
[Lady_Aleena]: Renaming things like get_THAC0 to just THAC0 was easy. These are harder.
[james28909]: consolidate the three subs into one
[Lady_Aleena]: Um, what?
[james28909]: check is is data or hash or array and do tasks then return needed data
[Lady_Aleena]: james28909, you might want to look at the other two on my scratchpad.
[james28909]: after you send to a sub, you can check if it is array or ref ect with ref
[james28909]: check if it is a hash or an array ect with ref in one sub.

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2017-05-24 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?