home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!munnari.oz.au!newsroom.utas.edu.au!probitas!dockhorn
- From: dockhorn@probitas.cs.utas.edu.au (Patrick Dockhorn)
- Subject: Re: A better mousetrap
- Message-ID: <dockhorn.724136821@probitas>
- Sender: news@newsroom.utas.edu.au
- Organization: University of Tasmania, Australia.
- References: <18287@mindlink.bc.ca>
- Date: Sat, 12 Dec 1992 05:07:01 GMT
- Lines: 47
-
- >Bear with me folks.
-
- >What I'm in the process of writing (or trying to write) is a more efficient
- >version of uuencode. I've noted that uuencode seems to cause 'file swelling',
- >on an average of 1:1.4 for binary files. (That is to say, a 100k binary
- >converts to a 140k ascii file.)
-
- >What I've been busy cobbling together is something that could be more
- >efficient. To date, my best efforts yield a pathetic average of 1:1.74 ratio
- >for binaries.
-
- uuencode converts 3 'binary bytes' into 4 printable ascii characters:
-
- Byte 0 Byte 1 Byte 2
- 01234567 01234567 01234567
- AAAAAABB BBBBCCCC CCDDDDDD
-
- The bits indicated by 'A' form the first character.
- uuencode simply adds a space to this value between
- 0 and 63 thus resulting in a printable ascii
- char. The procedure continues with B, C and
- D. There's also a special BEGIN-OF-LINE token
- to avoid problems with newlines.
-
- uuencode was written to allow binary files to be
- sent by services that can't handle but printable
- characters, (uuencode uses ASCII 32 - 96). Within
- this conditions there's no way to improve it - the
- only thing is compression, but this is usually done
- as a separate process, i.e. you compress a file and
- uuencode it then. I wrote my own uuencode/decode
- once because the standard one failed on an IBM 3090
- but this only increased the size of the files created
- and I used the same method and just added some more
- control information.
-
- Thus, IMHO, I don't see a chance for an improvement
- of uuencode.
-
- -patsch
-
- --
- The only possible interpretation of any research whatever in the
- `social sciences' is: some do, some don't.
- -- Ernest Rutherford
-
-
-