StUU (original) (raw)
Introduction
StUU is a lightning-fast drag-and-dropUUdecoder for the Mac.
StUU ran originally on 68000-based Macs running System 7, then on PowerPC Macs running System 7/8/9 or X, and now native on Intel Macs too.
StUU is pronounced "Stew U".
In addition to UU-encoded data, StUU 1.2 now also recognises and extractsBase64(i.e. "Content-transfer-encoding: base64" sections inMIME files).
Special Features
- Fast: On aPowerMac 6100/60with a good hard disk, StUU can decode over a megabyte per second.
- Drag-and-Drop: Simply drop files onto the StUU icon to have them decoded.
- Large Files: Any size files can be decoded, not limited by the amount of RAM your Mac has.
- Concatenated Files: If the source file contains multiple encoded files concatenated together, StUU will automatically recognise and extract all the component files.
- Robust: StUU correctly decodes files even if the text for a given file has been split up into multiple parts in separate newsgroup postings or email messages (a common practice when there's a message size limit). The separate parts do need to be concatenated together in the right order, but you don't need to strip out the newsgroup headers, trailers, signatures, etc.
- Internet Config: StUU uses Internet Config to automatically assign the correct file type and creator code to each file it decodes, so decoded files appear with the correct icons, and if you double-click on them the correct application will launch.
- As well as UU encoded data, StUU 1.2 also extracts Base64 encoded data. In particular it means it also handles all the special ways Mac files are encoded in Base64, including AppleSingle and AppleDouble with separate resource fork, in addition of course to plain-old simple Unix-style binary data files.
- When input file contains more than one encoded file, StUU will automatically detect this and make a subfolder to place the destination files into, instead of cluttering your desktop with hundreds of separate files.
How to use StUU
The intended mode of use is:
- Read your favourite binaries newsgroup with a newsreader like Nuntius
- Instead of reading or extracting each item individually, just hit Cmd-A (Select All) and Cmd-S (Save) to save all the articles to disk as one big file. Current versions of Nuntius sort articles into a sensible order so it is almost always the case that if all the parts of a binary are present, they will be saved in the right order. It is possible that some parts will be missing, duplicated, or out of order, resulting in invalid output, but let's face it, most of these newsgroups make up in quantity what they lack in quality, so it's hardly worth wasting your time to repair every mal-formed posting by hand (although you can if you want to).
- When Nuntius has finished saving the file, drag and drop it onto StUU, and in mere seconds (faster than duplicating the file in the Finder) the entire uuencoded contents will be extracted. The extracted files will be put in the same folder as the dropped file (as a rule of thumb, make sure you have free disk space equal to at least 75% of the size of the input file you are decoding).
Restrictions
StUU is designed to do one job really quickly and simply: It decodes uuencoded (and now Base64) files.
StUU only does decoding, not encoding.
If the file you want to decode is split into multiple parts, you must join all the parts together yourself before dropping the single joined file onto StUU. However, when joining the files together you do not need to manually remove mail headers and trailers from the individual parts -- StUU can do that automatically while it is decoding the data.
StUU does not give you any control over where the output files are written -- they are always written into the same folder as the source file.
StUU does not automatically delete the source file when it is finished.
StUU uses Internet Config. If you don't have Internet Config installed, then StUU can still decode files, but the type and creator codes will be set to '????'.
StUU requires System 7 or later, including 8.x, 9.x. It also works in the "Classic" environment on Mac OS X, which means all versions up to 10.4.x on PowerPC, but not 10.4.x on Intel (no Classic), and not at all in OS X 10.5 (Classic is gone even on PowerPC in 10.5).
November 2007: Just added: Carbon build of StUU that works on Mac OS X 10.5 Leopard and on Intel Macs.
Background
Why did I write StUU, when there are already lots of UU decoders for the Mac?
A little while ago, I had a large uuencoded file to decode. The file was 20 megabytes, and contained 112 component encoded files. I took a look on Sumex-Aim to see what uudecoding sofware was available for the Mac. I found eight different uudecoders, and tried them all. Rather than go into great detail, I'll just summarise the results:
- UUCat 1.1 failed with message "Error allocating memory for 'testfile.uu'. No space."
- UUParser 1.72 crashed with an address error.
- UnUU 2.0.1 failed with message "Out of memory! Try to give some more to UnUU (-108)"
- UUTool 2.4 decoded only the first file of the 112 and then stopped.
- MACUUCODE1.0.5 decoded only the first file of the 112 and then stopped.
- uuUndo 1.0b5 decoded only the first file of the 112 and then stopped.
- uucd 2.4.3 parsed the first 5 files of the 112 in 1 minute 16 seconds and then failed with message "The application's free memory seems to get low. You may have to give more memory to uucd from the Finder."
The only program that managed to finish decoding all the way to the end was Jeff Strobel's UULite2.0.
UULite2.0 has three modes, with varying "intelligence":
- UULite2.0 "No Frills Decoding" took 28 minutes.
- UULite2.0 "Smart Decoding" was faster at just 5 minutes 20 seconds.
- UULite2.0 "Super Smart Decoding" took 42 minutes.
Unfortunately none of UULite's modes, not even the "Super Smart" one, correctly decoded all of the 112 files, and I thought $29 was too expensive for a small utility program that I would only use occasionally.
Since I didn't intend to pay for it, I couldn't continue to use UULite with a clean conscience, so morally, I had to write my own.
I searched the Web, found the spec for uuencoded files, found DropShell 2.0 by Leonard Rosenthol, Marshall Clow, and Stephan Somogyi, put them together, and after one morning of work I had finished writing my own simple uudecodeder.
It took 24 seconds to decode the 20 megabyte file. I added calls to Internet Config to assign the correct file types and creator codes for the decoded files, and it took 25 seconds. I made the I/O calls asynchronous, and it took 20 seconds. Then on the recommendation ofQuinn, I tried it again with File Sharing turned off, and it took 16 seconds.
Well, there you have it. 20 megabytes decoded into 112 component files, complete with correct file types, in 16 seconds. For comparison, just duplicating the 20 megabyte file in the Finder took 17 seconds.
That makes StUU roughly 20 times faster that UULite's "Smart" mode, and 150 times faster than "Super Smart" mode. Sorry Jeff.
Where to get StUU
Download StUU 1.2, including source code, from here.
Update November 2007: Download now includes Carbon build of StUU that works on Mac OS X 10.5 Leopard and on Intel Macs. This is a quick and dirty conversion to Carbon, so there may be bugs. Source code is included, so if someone wants to fix it up, that would be great. Right now it's a CodeWarrior 8 project, but now that I've got it compiling Carbonized, switching it to Xcode shouldn't be too difficult.
Page maintained by Stuart Cheshire
(Check out my latest construction project:Swimming pool by Swan Pools)