File: btoa.1

package info (click to toggle)
btoa 5.2.1-5
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 80 kB
  • ctags: 57
  • sloc: ansic: 909; makefile: 65
file content (113 lines) | stat: -rw-r--r-- 3,707 bytes parent folder | download | duplicates (3)
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
.TH BTOA 1 "21 February 1989"
.SH NAME
btoa, atob \- encode/decode binary to printable ASCII
.SH SYNOPSIS
.B btoa
.RI [ -adhor "] [" "input filename" "] [" "output filename" ]
.SH DESCRIPTION
.B Btoa
is a filter which reads binary bytes from the input file and
generates printable ASCII characters on the output file. It attaches
a header and a checksum to the archive. It can also reverse this,
creating a binary file from the archive.
.LP
Since last version of
.BR btoa / atob ,
several new features have been
added. The most obvious one is that
.B atob
has been integrated
with
.B btoa.
They are now the same program which is called with
different arguments. Another is the ability to repair damaged
archives.
.LP
The new version is compatible with the old version, that is,
it can still encode and decode old btoa files.
.LP
.B Btoa
has an option to decode the archive, restoring the binary bytes.
It strips the input file until it finds a valid header, and continues
decoding until the end mark is found. It recognices both old- and
new-style headers, and can decode both. It is possible to leave out
the destination name when decoding new-style archives, because the
name is stored in the header. Entering a name will override the
autonaming function.
.LP
It is possible to leave out the file names and redirect stdin and
stdout with '<' and '>' to the desired files. This is to maintain
compatibility with earlier versions of
.B btoa.
.LP
.B Btoa
now adds a single byte checksum to each row in the archive.
When an error is found, diagnosis automatically starts and produces
a diagnosis file which can be used to extract the damaged part from
an errorfree archive. The extracted part can then be used to correct
the damaged archive.
.B Btoa
has options to perform the reparation
automatically. This is especially useful when downloading data
converted to text files, and occasionally finding that an archive
file of considerable size turns is corrupted.
.SH FEATURES
.B Btoa
encodes 4 binary bytes into 5 characters, expanding the file by
25%. As a special case 4 zeroes will be encoded as 'z' and 4
spaces as 'y'. This makes it possible to compress the archive a bit.
.SH OPTIONS
.TP
.I -h
Shows help on 
.BR btoa .
.TP
.I -a
Switches to
.B atob
(decoding) mode.
.TP
.I -o
Switches to old version of
.BR btoa .
.TP
.I -d
Extracts repair file from diagnosis file. This assumes that
an undamaged version of the archive and a file called
'btoa.dia' is present.
.TP
.I -r
Repairs the damaged archive. A file named 'btoa.rep' must
be present for this to work.
.SH EXAMPLES
Below follows a description of a normal repair session. Lines
beginning with 'Local>' were typed on the computer to which the
file was downloaded. Accordingly, lines typed on the connected
computer will begin with 'Remote>'. Sending a file to the other
computer will be noted as 'transmit file'.
.LP
A normal repairing procedure is as follows:
Local> btoa -a file.btoa
btoa: Bad checksum on line 2648.
btoa: Starting diagnosis.
btoa: Diagnosis output to 'btoa.dia'.
Local> transmit btoa.dia
.LP
Remote> btoa -d file.btoa
btoa: Repair output to 'btoa.rep'.
Remote> transmit btoa.rep
.LP
Local> btoa -a btoa.rep
btoa: Repaired archive written to 'btoa.rdy'.
.LP
You can now erase file.btoa and decode btoa.rdy using 'btoa -a btoa.rdy'.
.SH AUTHORS
Paul Rutter  Joe Orost  Stefan Parmark
.SH KNOWN BUGS
.B Btoa
will not work properly unless the input is a true file or a
redirected one. This is because file positions are collected during
diagnosis for later reference when producing the diagnosis file.
The bug is actually in fseek() which only can reposition 'real' files.
.LP
Send bug reports to d84sp@efd.lth.se (Stefan Parmark).