File: dact.1

package info (click to toggle)
dact 0.8.42-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 1,404 kB
  • sloc: ansic: 5,923; sh: 2,748; makefile: 141
file content (180 lines) | stat: -rw-r--r-- 6,171 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.TH DACT 1
.SH NAME
dact \- compress or expand a file or stream
.SH SYNOPSIS
.ll +10
.B dact
.RB [ " \-dsfcvlniCHOShVNa " ]
.RB [ \-b\ size ]
.RB [ \-e\ algo ]
.RB [ \-m\ file ]
.RB [ \-o\ file ]
.RB [ \-u\ url ]
.RB [ \-p\ url ]
.RB [ \-M\ command ]
.RB [ \-D\ desc ]
.RB [ \-I\ algo ]
.RB [ \-U\ file ]
.RB [ \-E\ cipher ]
.RB [ "file ..." ]
.ll -10
.SH DESCRIPTION
.I DACT
reduces input files by attempting to compress each block
of the file with several different algorithms and selects the
best one for each block.

.SH OPTIONS
.TP
.B \-d
Decompress the file (or stdin, if no file is given), removing
the extension if it has a valid one.
.TP
.B \-s
Display statistics about the file, such as:
Magic number of file, DACT version file was compressed with, Block size used to compress file, Compressed file size, Original file's size, Compression ratio (uncompressed to compressed), File's original name, CRCs (if available).
.TP
.B \-f
Force bad and unsafe things to happen.  Can be combined to
make even worse things happen.  One `\-f' allows overwriting of
existing files, two `\-f' allows you to ignore bad magic and
CRC check fails.
.TP
.B \-c
Send output to stdout, this will allow you to force DACT to
send compressed output to a terminal or result of compressing
a file to a pipe.
.TP
.B \-v
Increase verbosity, can be combined to increase verbosity a
lot.  Currently, only up to 3 makes sense.  One `\-v' displays
a bar graph.  Two `\-v' displays a bar graph and block
information.  Three `\-v' displays a bar graph and detailed
compression statistics per block.
.TP
.B \-l
List compression algorithms available.
.TP
.B \-n
Toggle use of CRCs.  This option is especially useful when
combined with the network capabilities of DACT.  It allows
you to create a compressed file with only the header pointing
to a web page that contains the real DACT file (which
normally has its CRCs checked against the compressed header
to ensure they're the same file), with this option the files
do not have to be from the same source (i.e., you can have
an updated copy automatically extend itself.)
.TP
.B \-i
Read input from standard input instead of /dev/tty.  This is used to read user supplied information like encryption keys and passwords from standard input instead of the more appropriate method of opening "/dev/tty."
.TP
.B \-C
Complain when compression errors occur.  When a block is
selected, it is tested to ensure that it decompresses back
to the original source.  If it fails, the algorithm is not
used, with this option you are informed of the failure.
.TP
.B \-H
Write only header (no data).  This option is useful for
distributing archives that need only reside on the internet
someplace.
.TP
.B \-O
Toggle writing original file name in the DACT header. This
has no real use that I know of.
.TP
.B \-S
Use speed-size as a metric rather than size.  This is not
implemented yet.  This will make DACT create an optimized
compressed file, balancing speed of decompression with size.
.TP
.B \-h
Give usage synopsis.
.TP
.B \-V
Display DACT version.
.TP
.B \-N
Upgrade DACT.  This option will fetch the latest binary from
the internet and place it in $HOME/.dact/ as dact.bin.  If
you have `binary_check on' in your dact.conf file, DACT will
check for this file and use it.  If you have Debian and run
`dact \-N'   as root the Debian upgrade procedure will upgrade
your entire system.
.TP
.B \-a
DACT modules.  This option will fetch the latest modules from the internet and place them in $HOME/.dact/ in a subdirectory corresponding to your Operating System and CPU Architecture.
.TP
.B \-b\ size
Use the specified block size to compress the file.  The
size parameters is in bytes.
.TP
.B \-e\ num
Exclude an algorithm from being used.  This option is useful
if you know your target will not be able to decompress a
certain algorithm (you can get their numbers from the `\-l'
option.)
.TP
.B \-m\ file
Load another config file.  This option will attempt to load
the specified file in addition to the normal files, the
options in this file will supersede other options.
.TP
.B \-o\ file
Alternate output.  This option sends output to a file instead
of INFILE.dct.  The file can also be a URL or '-' for standard
out.
.TP
.B \-u\ url
This option will encode an URL in the compressed file's header,
this URL will be tried (and CRCs checked) before attempting to
decompress the data in the actual file.
.TP
.B \-p\ url
URLs in DACT can have variables in them that will be expanded when network access is required, this allows you to test the results of that extrapolation easily.  Variables and their values are:
    @@OSNM@@        OS Name (linux, freebsd, sunos, etc)
    @@OSVR@@        OS version (2.2.x, 4.2, 5.8, etc)
    @@OSVS@@        OS version (short) (2.2, 4.2, 5.8, etc)
    @@ARCH@@        Arch (i386, sparc64, sun4u, sun4m, etc)
    @@DIST@@        If OSNM=Linux, distribution of Linux.
    @@FILE@@        Name of compressed file.
    @@DTVR@@        Version of DACT (maj.min.rev)
    @@DTVS@@        Version of DACT (short) (maj.min)
    @@PASS@@        Prompt for Password
    @@USER@@        Prompt for Username
    @@ATSN@@        Put an `@'
  example:
    dact \-p http://www.rkeene.org/devel/dact/precompiled/dact-@@OSNM@@-@@OSVS@@-@@ARCH@@.bin
    dact: http://www.rkeene.org/devel/dact/precompiled/dact-linux-2.4-i586.bin
.TP
.B \-M\ command
This option executes a command from the command line as if it appeared in "dact.conf".
.TP
.B \-D\ desc
Encode the description specified into the header of the
compressed file.
.TP
.B \-I\ num
Use only 1 algorithm (and uncompressed as a fall-back), useful
if you want to limit yourself to a certain type of compression.
.TP
.B \-U\ file
Encode the specified file into the header of the compressed
file.  This file will be searched (line-by-line) for a working
URL to download compressed content from.  See also `\-u.'
.TP
.B \-E\ cipher
Enable encryption using the specified algorithm, different
algorithms use different authentication methods.

.SH FILES
  $HOME/.dact/
  $HOME/.dact/dact.conf
  /etc/dact.conf

.SH "SEE ALSO"
gzip(1), bzip2(1), mcrypt(3)

.SH AUTHOR
Roy Keene
.I <dact@rkeene.org>