g3net is a utility to send arbitrary files as attachments
to a fax. This is extremely useful to exchange data with people
which are only able to send/receive faxes with a faxmodem, and
cannot set up a proper data connection (uucp, kermit, slip/ppp,
Full sources and an
MSDOS executable are available from the author.
Since most people would wonder "Why should I use such a thing!",
the section MOTIVATION will explain why.
Please take off your
"computer guru" hat when reading that.
Use of g3net
g3net has two operating modes:
Note that the ``fax'' includes a lot of redundancy, so that even
if up to 30% of fax lines are lost/corrupted, it is possible to
reconstruct the original document.
Transferring files with g3net is extremely simple:
- in ENCODING mode, it takes a set of input files and encodes them
producing a TIFF-G3 file. Such a file can be easily handled by
any (well, most) fax-handling packages and transmitted to the
remote end as if it were a plain fax. No special software is
required to send/receive this file.
- in DECODING mode, it takes a received fax document (usually
containing G3 data) and decodes it. If the ``fax'' was produced
by g3net, the files which are part of the archive are extracted.
- the sender encodes files with g3net, producing a TIFF file
- the TIFF file is transmitted as a fax, using a standard fax-handling
- the TIFF file is received as a fax, using a standard fax-handling
- the received fax is decoded using g3net in decode mode. Since this
is the default operating mode, under Windows it suffices to
drag the received document over g3net to extract the attachments.
Q: Why should one use this complex encoding, when there are
better ways to transfer data across two modems, i.e.:
A: Consider the typical uses of a fax:
- run UUCP
- run PPP/SLIP
- use some package like kermit, rzsz or the like.
A paper FAX is very well suited to the first situation. However other
probably account for the vast majority of faxes exchanged nowadays.
In all these cases, the receiver would greatly benefit from having
the document sent in some easy-to-process form, e.g. a file containing
the desired data. This is what modems and data network have been
designed for, you would say ...
- sending a facsimile of an existing paper document;
- send a short note (an order for a product, or a message, etc.)
- send a relatively long document (e.g. some product information,
or a listing, or an article);
- exchange a document (e.g. a form to be filled in with proper
data, or a document which is being edited/revised by different
Unfortunately, most people who own a faxmodem cannot set up a proper
data interconnection. They happily run their faxmodems connected
to a Windows/Macintosh box with the fax-handling package which
comes with the modem. To them, UUCP, PPP, RZSZ are just obscure
The usefulness of an easy-to-use data-exchanging utility is so
strong that several producers try to support it. First of all, the
G3 standard includes a ``Binary File Transfer'' capability. None
of the Class2 faxmodem that I have tried support this option (maybe
they do in Class1 mode, this I don't know).
Some FAX-handling packages (e.g. WinFax PRO, Microsoft FAX in Win95)
claim to support transfer of binary files using Class1 modems and
probably use a proprietary standard to interpret information.
Requiring special capabilities for the hardware (or driving it in
a special way) and using proprietary protocols is the best way to:
At least now, the latter seems to be true for data transfers across faxmodems,
although big software companies are known to be able to drive the
market wherever they want.
- push the market to use your product, or
- make a feature totally useless
g3net tries to overcome these limitations in two ways:
Error correction is an important feature of g3net. Transfers across
faxmodems are subject to errors due to noisy lines, or slow receiving
programs which cannot handle incoming data properly, and it is generally
time-consuming to request the retransmission of missing data. Hence,
files encoded with g3net include enough redundant information
(through the use of a (255,192) Reed-Solomon code and various forms
of interleaving) to be able to reconstruct the original document
even if 30% of fax lines are not received (or some of them are
- allows data transfer without requiring special capabilities for the
sender/receiver. A plain fax modem will suffice (actually, files
encoded with g3net will be received happily by your paper fax,
although you'll have a hard time in using them other than for a
- uses a non-proprietary data format (in the sense that full
sources of the decoder/encoder are freely available), making it
possible to exchange files between different architectures. As
a side effect, this feature also makes data forwarding possible.
There are several applications for g3net:
CUTTING PHONE BILL COSTS
Typically fax messages include mostly textual information.
The ``rendered'' version of these messages have a size of
30..100KB per page, whereas the corresponding ASCII (or RTF,
or DOC... ) files are 1-2KB at most. Hence, transmission times
can be cut by 15..40 sec/page, with corresponding savings,
especially on long distance calls and long documents.
SENDING REUSABLE DATA
Data sent with g3net can be easily reused at the receiver, since
they are in binary format. This is extremely useful for people
willing to exchange documents without having to set up some kind
Since g3net enables users to transfer arbitrary files, sensitive
data can be sent as encrypted files, with the decryption key
transferred separately. E.g. you can send reserved info to
somebody's fax server without worrying that indiscrete eyes can
watch at them, only the authorized people can read the
DEVELOPING NEW APPLICATIONS
The ability to transfer binary files in a transparent way enables
a number of new applications. We mention only a few of them:
Sources compile fine with gcc (djgpp under DOS), and are written
to be as platform-independant as possible. It is likely that it
can even compile on Apple systems.
- COLOR FAX (transfer images encoded with g3net; a JPEG image is
not much bigger than a comparable-size fax page, and can be
- DATA OVER FAX (use g3net and a fax connection as a transport for
email for places which cannot setup a proper UUCP connection);
- DATA ON DEMAND (include g3net-encoded files, e.g. drivers,
pictures, among those server by a fax-on-demand system; this is
trivial and does not require any change whatsoever to the
- DATA COLLECTION (a factory, store, or other site can receive
reports from remote sites using the same line used for incoming
This program could not have been written without the availability
of a Reed-Solomon implementation ("rs.c") by Phil Karn, Robert
Morelos-Zaragoza (email@example.com) and Hari Thirumoorthy
(firstname.lastname@example.org). The file "tiff.h" and some details
on the structure of TIFF files come from the "libtiff" package by
Sam Leffler. The "getopt" implementation comes from the BSD sources.
Finally, this program can compile easily under MSDOS thank to the
DJGPP compiler (a port of GNU's gcc to MSDOS) by D.J. Delorie. The
proper Copyright messages appear in each file which has not been
written originally by me.
For this package as a whole, the Copyright conditions are specified in
"g3net.c". It is basically a BSD-style copyright.
Luigi Rizzo (email@example.com)