in reply to Perl - Socket and Data Compression

I have found 7-ZIP http://www.7-zip.org/, to compress far better than .zip, tar or variations.

This is not a solution to encryption, just a data compression solution. but it often does about 30% better.

I think you your problem is to distribute the SW and get it downloaded. Put up a site that can be accessed via SSL. Let your clients download this humongous thing..at this level of bandwidth required, you may not even have to worry about data compression! Or at least for what your clients pay their ISP.

Replies are listed 'Best First'.
Re^2: Perl - Socket and Data Compression
by pileofrogs (Priest) on Jul 18, 2009 at 04:38 UTC

    There are a number of possibilities:

    You could use Expect to fake a password interaction with SSH. That's probably your best bet because it does everything you want.

    You could read the stdin and then send it to a socket, so your script has a similer user interface to ssh. E.G

    $ tar -czgf- /path/to/stuff | ./your_script

    You could use named pipes (AKA fifo).

    $ mkfifo mypipe $ tar -czf mypipe /path/to/stuff & $ ./your_script --infile mypipe

    The best place to read about all this and more is perlipc.

    If you're going to do your own networking, and not use SSH, check out IO::Socket::SSL.

      My post was just "how to compress the bits". How to securely access the compresed bits is a different question which I didn't address.

      From my experience the .7Z format is cool. But I've found my typical users can't install this thing even though its freeware. However, I've also found that I can use this thing to make a .zip file about 10x as fast and 20% smaller than the Windows .zip program. The Windows "unzip" can read this 7zipped, .zip file.

        Woah... I missed the boat on that one...

        What about bzip2? tar -cvjf - /path/to/stuff | ...

        There's also rar, but I don't know much about it. I know there's a unix command unrar

        --Pileofrogs