Artifact [06545df9e9]

Artifact 06545df9e980451d84ba97c923082a6387f66e7f:

Wiki page [Network Access] by rkeene 2013-02-26 02:53:05.
D 2013-02-26T02:53:05.148
L Network\sAccess
U rkeene
W 2317
DACT has very rich network support.  It supports referencing files on the command line (though not in the way you would expect), embedding netscape-style URLs in the header to be checked (and CRC verified) before extracting the local data, and even emebedding a file with a list of URLs to check with variable substitution.

Support for extracting files on the command line currently operates exactly the same for local files as for files specified in URL style.  This means that if you were to do:<br>
&nbsp;&nbsp;&nbsp;&nbsp;<tt>dact -d ftp://www.rkeene.org/users/rkeene/dact.tar.gz</tt><br>
DACT would try to write to the file ftp://www.rkeene.org/users/rkeene/dact.tar which will fail.

Examples:
<ul>
  <li><tt>dact -Hu http://www.bob.com/report.ps.dct report.ps</tt><br>This would create the file report.ps.dct which contained no actual data, but rather the two CRCs and a reference to the online version of report.ps.dct. This is useful where you want to include a large file in a distribution but don't think most people will ever use it.</li>
  <li><tt>dact -nu http://www.bob.com/bobsoft/bobsoft-latest.tar.dct bobsoft-latest.tar</tt><br>This would create a file called bobsoft-latest.tar.dct that contained the compressed contents of bobsoft-latest.tar and a reference to http://www.bob.com/bobsoft/bobsoft-latest.tar.dct, but no CRCs. This is useful when you want to distribute something labled "latest" and be accurate. Upon decompression DACT will first check the URL for the file, if that fails, use the actual contents. The CRCs are left off to allow the online version to be different (since supposedly it will be changing.)</li>
  <li><tt>dact -dc http://www.bob.com/neatsoft.tar.dct | tar -xf -</tt><br>This is useful for decompressing files from the internet without storing their compressed forms on disk.</li>
  <li><tt>dact -nu http://www.bob.com/bobsoft-bin-@@OSNM@@-@@OSVS@@-@@ARCH@@.dct bobsoft-bin</tt><br>This is useful for providing a precompiled binary, because of the substitution done, the correct binary will be fetched when attempting to decompress the created file bobsoft-bin.dct (which could contain a shell script telling the user there was no available precompiled binary, since it would default to the local file only if the network URL was unavailable.)</li>
</ul>
Z 06e5b65197faa7fc3bb8b08153dbfb21