Since last version of btoa/atob, several new features have been added. The most obvious one is that atob has been integrated with btoa. They are now the same program which is called with different arguments. Another is the ability to repair damaged archives.
The new version is compatible with the old version, that is, it can still encode and decode old btoa files.
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.
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 btoa.
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. 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.
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
Remote> btoa -d file.btoa btoa: Repair output to 'btoa.rep'. Remote> transmit btoa.rep
Local> btoa -a btoa.rep btoa: Repaired archive written to 'btoa.rdy'.
You can now erase file.btoa and decode btoa.rdy using 'btoa -a btoa.rdy'.
Send bug reports to d84sp@efd.lth.se (Stefan Parmark).